Documentation ¶
Index ¶
- func ConfigExists(dataPath string) (bool, error)
- type Chain
- func (ch *Chain) AllAPIHosts() []string
- func (ch *Chain) AllNodesMultiClient() *multiclient.MultiClient
- func (ch *Chain) AllPeeringHosts() []string
- func (ch *Chain) BlockIndex(nodeIndex ...int) (uint32, error)
- func (ch *Chain) ChainAddress() iotago.Address
- func (ch *Chain) Client(sigScheme *cryptolib.KeyPair, nodeIndex ...int) *chainclient.Client
- func (ch *Chain) CommitteeAPIHosts() []string
- func (ch *Chain) CommitteeMultiClient() *multiclient.MultiClient
- func (ch *Chain) CommitteePeeringHosts() []string
- func (ch *Chain) ContractRegistry(nodeIndex ...int) ([]apiclient.ContractInfoResponse, error)
- func (ch *Chain) DeployContract(name, progHashStr string, initParams map[string]interface{}) (*iotago.Transaction, error)
- func (ch *Chain) DeployWasmContract(name string, progBinary []byte, initParams map[string]interface{}) (hashing.HashValue, error)
- func (ch *Chain) GetAllBlockInfoRecordsReverse(nodeIndex ...int) ([]*apiclient.BlockInfoResponse, error)
- func (ch *Chain) GetBlobFieldValue(blobHash hashing.HashValue, field string) ([]byte, error)
- func (ch *Chain) GetCounterValue(inccounterSCHname isc.Hname, nodeIndex ...int) (int64, error)
- func (ch *Chain) GetRequestReceipt(reqID isc.RequestID, nodeIndex ...int) (*apiclient.ReceiptResponse, error)
- func (ch *Chain) GetRequestReceiptsForBlock(blockIndex *uint32, nodeIndex ...int) ([]apiclient.ReceiptResponse, error)
- func (ch *Chain) GetStateVariable(contractHname isc.Hname, key string, nodeIndex ...int) ([]byte, error)
- func (ch *Chain) OriginatorAddress() iotago.Address
- func (ch *Chain) OriginatorClient() *chainclient.Client
- func (ch *Chain) OriginatorID() isc.AgentID
- func (ch *Chain) SCClient(contractHname isc.Hname, sigScheme *cryptolib.KeyPair, nodeIndex ...int) *scclient.SCClient
- type Cluster
- func (clu *Cluster) ActiveNodes() []int
- func (clu *Cluster) AddTrustedNode(peerInfo apiclient.PeeringTrustRequest, onNodes ...[]int) error
- func (clu *Cluster) AddressBalances(addr iotago.Address) *isc.Assets
- func (clu *Cluster) AllNodes() []int
- func (clu *Cluster) AssertAddressBalances(addr iotago.Address, expected *isc.Assets) bool
- func (clu *Cluster) DeployChain(allPeers, committeeNodes []int, quorum uint16, stateAddr iotago.Address, ...) (*Chain, error)
- func (clu *Cluster) DeployChainWithDKG(allPeers, committeeNodes []int, quorum uint16, blockKeepAmount ...int32) (*Chain, error)
- func (clu *Cluster) DeployDefaultChain() (*Chain, error)
- func (clu *Cluster) GetOutputs(addr iotago.Address) (map[iotago.OutputID]iotago.Output, error)
- func (clu *Cluster) InitDKG(committeeNodeCount int) ([]int, iotago.Address, error)
- func (clu *Cluster) InitDataPath(templatesPath string, removeExisting bool) error
- func (clu *Cluster) IsNodeUp(i int) bool
- func (clu *Cluster) KillNodeProcess(nodeIndex int, gracefully bool) error
- func (clu *Cluster) L1BaseTokens(addr iotago.Address) uint64
- func (clu *Cluster) L1Client() l1connection.Client
- func (clu *Cluster) Logf(format string, args ...any)
- func (clu *Cluster) MultiClient() *multiclient.MultiClient
- func (clu *Cluster) NewKeyPairWithFunds() (*cryptolib.KeyPair, iotago.Address, error)
- func (clu *Cluster) NodeDataPath(i int) string
- func (clu *Cluster) PostTransaction(tx *iotago.Transaction) error
- func (clu *Cluster) RequestFunds(addr iotago.Address) error
- func (clu *Cluster) RestartNodes(keepDB bool, nodeIndexes ...int) error
- func (clu *Cluster) RunDKG(committeeNodes []int, threshold uint16, timeout ...time.Duration) (iotago.Address, error)
- func (clu *Cluster) Start() error
- func (clu *Cluster) StartAndTrustAll(dataPath string) error
- func (clu *Cluster) Stop()
- func (clu *Cluster) StopNode(nodeIndex int)
- func (clu *Cluster) TrustAll() error
- func (clu *Cluster) Wait()
- func (clu *Cluster) WaspClient(nodeIndex ...int) *apiclient.APIClient
- func (clu *Cluster) WaspClientFromHostName(hostName string) *apiclient.APIClient
- type ClusterConfig
- func (c *ClusterConfig) APIHost(nodeIndex int) string
- func (c *ClusterConfig) APIHosts(nodeIndexes ...[]int) []string
- func (c *ClusterConfig) APIPort(nodeIndex int) int
- func (c *ClusterConfig) AllNodes() []int
- func (c *ClusterConfig) L1APIAddress(nodeIndex int) string
- func (c *ClusterConfig) PeeringHost(nodeIndex int) string
- func (c *ClusterConfig) PeeringHosts(nodeIndexes ...[]int) []string
- func (c *ClusterConfig) PeeringPort(nodeIndex int) int
- func (c *ClusterConfig) ProfilingPort(nodeIndex int) int
- func (c *ClusterConfig) PrometheusPort(nodeIndex int) int
- func (c *ClusterConfig) Save(dataPath string) error
- func (c *ClusterConfig) ValidatorAddress(nodeIndex int) string
- func (c *ClusterConfig) ValidatorKeyPair(nodeIndex int) *cryptolib.KeyPair
- type WaspConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConfigExists ¶ added in v0.1.0
Types ¶
type Chain ¶ added in v0.1.0
type Chain struct { OriginatorKeyPair *cryptolib.KeyPair AllPeers []int CommitteeNodes []int Quorum uint16 StateAddress iotago.Address ChainID isc.ChainID Cluster *Cluster }
func (*Chain) AllAPIHosts ¶ added in v0.2.0
func (*Chain) AllNodesMultiClient ¶ added in v0.3.0
func (ch *Chain) AllNodesMultiClient() *multiclient.MultiClient
func (*Chain) AllPeeringHosts ¶ added in v0.2.0
func (*Chain) BlockIndex ¶ added in v0.2.0
func (*Chain) ChainAddress ¶ added in v0.1.0
func (*Chain) CommitteeAPIHosts ¶ added in v0.2.0
func (*Chain) CommitteeMultiClient ¶ added in v0.1.0
func (ch *Chain) CommitteeMultiClient() *multiclient.MultiClient
func (*Chain) CommitteePeeringHosts ¶ added in v0.2.0
func (*Chain) ContractRegistry ¶ added in v0.2.0
func (ch *Chain) ContractRegistry(nodeIndex ...int) ([]apiclient.ContractInfoResponse, error)
func (*Chain) DeployContract ¶ added in v0.1.0
func (*Chain) DeployWasmContract ¶ added in v0.1.0
func (*Chain) GetAllBlockInfoRecordsReverse ¶ added in v0.2.0
func (ch *Chain) GetAllBlockInfoRecordsReverse(nodeIndex ...int) ([]*apiclient.BlockInfoResponse, error)
func (*Chain) GetBlobFieldValue ¶ added in v0.1.0
func (*Chain) GetCounterValue ¶ added in v0.2.0
func (*Chain) GetRequestReceipt ¶ added in v0.2.0
func (*Chain) GetRequestReceiptsForBlock ¶ added in v0.2.0
func (*Chain) GetStateVariable ¶ added in v0.2.0
func (*Chain) OriginatorAddress ¶ added in v0.1.0
func (*Chain) OriginatorClient ¶ added in v0.1.0
func (ch *Chain) OriginatorClient() *chainclient.Client
func (*Chain) OriginatorID ¶ added in v0.1.0
type Cluster ¶
type Cluster struct { Name string Config *ClusterConfig Started bool DataPath string OriginatorKeyPair *cryptolib.KeyPair // contains filtered or unexported fields }
func (*Cluster) ActiveNodes ¶ added in v0.1.0
func (*Cluster) AddTrustedNode ¶ added in v0.3.0
func (clu *Cluster) AddTrustedNode(peerInfo apiclient.PeeringTrustRequest, onNodes ...[]int) error
func (*Cluster) AddressBalances ¶ added in v0.3.0
func (*Cluster) AssertAddressBalances ¶ added in v0.3.0
func (*Cluster) DeployChain ¶ added in v0.1.0
func (*Cluster) DeployChainWithDKG ¶ added in v0.2.0
func (*Cluster) DeployDefaultChain ¶ added in v0.1.0
func (*Cluster) GetOutputs ¶ added in v0.3.0
func (*Cluster) InitDataPath ¶ added in v0.1.0
InitDataPath initializes the cluster data directory (cluster.json + one subdirectory for each node).
func (*Cluster) KillNodeProcess ¶ added in v0.3.0
func (*Cluster) L1BaseTokens ¶ added in v0.3.0
func (*Cluster) L1Client ¶ added in v0.3.0
func (clu *Cluster) L1Client() l1connection.Client
func (*Cluster) MultiClient ¶ added in v0.1.0
func (clu *Cluster) MultiClient() *multiclient.MultiClient
func (*Cluster) NewKeyPairWithFunds ¶ added in v0.2.0
func (*Cluster) NodeDataPath ¶ added in v0.3.0
func (*Cluster) PostTransaction ¶
func (clu *Cluster) PostTransaction(tx *iotago.Transaction) error
func (*Cluster) RequestFunds ¶ added in v0.3.0
func (*Cluster) RestartNodes ¶ added in v0.3.0
func (*Cluster) StartAndTrustAll ¶ added in v1.0.3
StartAndTrustAll launches all wasp nodes in the cluster, each running in its own directory
func (*Cluster) Stop ¶
func (clu *Cluster) Stop()
Stop sends an interrupt signal to all nodes and waits for them to exit
func (*Cluster) WaspClient ¶ added in v0.1.0
type ClusterConfig ¶
type ClusterConfig struct { Wasp []templates.WaspConfigParams L1 l1connection.Config }
func LoadConfig ¶ added in v0.1.0
func LoadConfig(dataPath string) (*ClusterConfig, error)
func NewConfig ¶ added in v0.3.0
func NewConfig(waspConfig WaspConfig, l1Config l1connection.Config, modifyConfig ...templates.ModifyNodesConfigFn) *ClusterConfig
func (*ClusterConfig) APIHost ¶ added in v0.2.0
func (c *ClusterConfig) APIHost(nodeIndex int) string
func (*ClusterConfig) APIHosts ¶ added in v0.2.0
func (c *ClusterConfig) APIHosts(nodeIndexes ...[]int) []string
func (*ClusterConfig) APIPort ¶ added in v0.2.0
func (c *ClusterConfig) APIPort(nodeIndex int) int
func (*ClusterConfig) AllNodes ¶ added in v0.1.0
func (c *ClusterConfig) AllNodes() []int
func (*ClusterConfig) L1APIAddress ¶ added in v0.3.0
func (c *ClusterConfig) L1APIAddress(nodeIndex int) string
func (*ClusterConfig) PeeringHost ¶ added in v0.1.0
func (c *ClusterConfig) PeeringHost(nodeIndex int) string
func (*ClusterConfig) PeeringHosts ¶ added in v0.1.0
func (c *ClusterConfig) PeeringHosts(nodeIndexes ...[]int) []string
func (*ClusterConfig) PeeringPort ¶ added in v0.1.0
func (c *ClusterConfig) PeeringPort(nodeIndex int) int
func (*ClusterConfig) ProfilingPort ¶ added in v0.2.0
func (c *ClusterConfig) ProfilingPort(nodeIndex int) int
func (*ClusterConfig) PrometheusPort ¶ added in v0.2.0
func (c *ClusterConfig) PrometheusPort(nodeIndex int) int
func (*ClusterConfig) Save ¶ added in v0.1.0
func (c *ClusterConfig) Save(dataPath string) error
func (*ClusterConfig) ValidatorAddress ¶ added in v1.0.3
func (c *ClusterConfig) ValidatorAddress(nodeIndex int) string
func (*ClusterConfig) ValidatorKeyPair ¶ added in v1.0.3
func (c *ClusterConfig) ValidatorKeyPair(nodeIndex int) *cryptolib.KeyPair
type WaspConfig ¶ added in v0.1.0
type WaspConfig struct { NumNodes int // node ports are calculated as these values + node index FirstAPIPort int FirstPeeringPort int FirstProfilingPort int FirstMetricsPort int }
func DefaultWaspConfig ¶ added in v0.3.0
func DefaultWaspConfig() WaspConfig
func (*WaspConfig) WaspConfigTemplateParams ¶ added in v0.3.0
func (w *WaspConfig) WaspConfigTemplateParams(i int) templates.WaspConfigParams
Click to show internal directories.
Click to hide internal directories.