apilib

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2021 License: Apache-2.0, BSD-2-Clause Imports: 15 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ActivateChainOnAccessNodes added in v0.2.0

func ActivateChainOnAccessNodes(apiHosts, peers []string, chainID *iscp.ChainID) error

ActivateChainOnAccessNodes puts chain records into nodes and activates its TODO needs refactoring and optimization

func CreateChainOrigin added in v0.2.0

func CreateChainOrigin(node *goshimmer.Client, originator *ed25519.KeyPair, stateController ledgerstate.Address, dscr string) (*iscp.ChainID, *ledgerstate.Transaction, error)

CreateChainOrigin creates and confirms origin transaction of the chain and init request transaction to initialize state of it

func DeployChain added in v0.1.0

func DeployChain(par CreateChainParams, stateControllerAddr ledgerstate.Address) (*iscp.ChainID, error)

func DeployChainWithDKG added in v0.2.0

func DeployChainWithDKG(par CreateChainParams) (*iscp.ChainID, ledgerstate.Address, error)

DeployChainWithDKG performs all actions needed to deploy the chain TODO: [KP] Shouldn't that be in the client packages?

func RunDKG added in v0.2.0

func RunDKG(apiHosts, peeringHosts []string, threshold, initiatorIndex uint16, timeout ...time.Duration) (ledgerstate.Address, error)

RunDKG runs DKG procedure on specific Wasp hosts: generates new keys and puts corresponding committee records into nodes. In case of success, generated address is returned

Types

type CreateChainParams added in v0.1.0

type CreateChainParams struct {
	Node                  *goshimmer.Client
	AllAPIHosts           []string
	AllPeeringHosts       []string
	CommitteeAPIHosts     []string
	CommitteePeeringHosts []string
	N                     uint16
	T                     uint16
	OriginatorKeyPair     *ed25519.KeyPair
	Description           string
	Textout               io.Writer
	Prefix                string
}

Jump to

Keyboard shortcuts

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