Documentation ¶
Index ¶
- type ClientResolver
- type MultiClient
- func (m *MultiClient) ActivateChain(chainID isc.ChainID) error
- func (m *MultiClient) DKSharesGet(sharedAddress iotago.Address) ([]*apiclient.DKSharesInfo, error)
- func (m *MultiClient) DeactivateChain(chainID isc.ChainID) error
- func (m *MultiClient) Do(f func(int, *apiclient.APIClient) error) error
- func (m *MultiClient) Len() int
- func (m *MultiClient) NodeVersion() ([]*apiclient.VersionResponse, error)
- func (m *MultiClient) PutChainRecord(bd *registry.ChainRecord) error
- func (m *MultiClient) WaitUntilAllRequestsProcessed(chainID isc.ChainID, tx *iotago.Transaction, waitForL1Confirmation bool, ...) ([]*apiclient.ReceiptResponse, error)
- func (m *MultiClient) WaitUntilAllRequestsProcessedSuccessfully(chainID isc.ChainID, tx *iotago.Transaction, waitForL1Confirmation bool, ...) ([]*apiclient.ReceiptResponse, error)
- func (m *MultiClient) WaitUntilRequestProcessed(chainID isc.ChainID, reqID isc.RequestID, waitForL1Confirmation bool, ...) (*apiclient.ReceiptResponse, error)
- func (m *MultiClient) WaitUntilRequestProcessedSuccessfully(chainID isc.ChainID, reqID isc.RequestID, waitForL1Confirmation bool, ...) (*apiclient.ReceiptResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientResolver ¶
type MultiClient ¶
MultiClient allows to send webapi requests in parallel to multiple wasp nodes
func New ¶
func New(resolver ClientResolver, hosts []string) *MultiClient
New creates a new instance of MultiClient
func (*MultiClient) ActivateChain ¶
func (m *MultiClient) ActivateChain(chainID isc.ChainID) error
ActivateChain sends a request to activate a chain in all wasp nodes
func (*MultiClient) DKSharesGet ¶
func (m *MultiClient) DKSharesGet(sharedAddress iotago.Address) ([]*apiclient.DKSharesInfo, error)
DKSharesGet retrieves distributed key info with specific ChainID from multiple hosts.
func (*MultiClient) DeactivateChain ¶
func (m *MultiClient) DeactivateChain(chainID isc.ChainID) error
DeactivateChain sends a request to deactivate a chain in all wasp nodes
func (*MultiClient) Do ¶
Do executes a callback once for each node in parallel, then wraps all error results into a single one
func (*MultiClient) Len ¶
func (m *MultiClient) Len() int
func (*MultiClient) NodeVersion ¶
func (m *MultiClient) NodeVersion() ([]*apiclient.VersionResponse, error)
NodeVersion returns the versions of all the nodes
func (*MultiClient) PutChainRecord ¶
func (m *MultiClient) PutChainRecord(bd *registry.ChainRecord) error
PutChainRecord calls PutChainRecord in all wasp nodes
func (*MultiClient) WaitUntilAllRequestsProcessed ¶
func (m *MultiClient) WaitUntilAllRequestsProcessed(chainID isc.ChainID, tx *iotago.Transaction, waitForL1Confirmation bool, timeout time.Duration) ([]*apiclient.ReceiptResponse, error)
WaitUntilAllRequestsProcessed blocks until all requests in the given transaction have been processed by all nodes
func (*MultiClient) WaitUntilAllRequestsProcessedSuccessfully ¶
func (m *MultiClient) WaitUntilAllRequestsProcessedSuccessfully(chainID isc.ChainID, tx *iotago.Transaction, waitForL1Confirmation bool, timeout time.Duration) ([]*apiclient.ReceiptResponse, error)
WaitUntilAllRequestsProcessedSuccessfully is similar to WaitUntilAllRequestsProcessed but also checks the receipts and return an error if any of the requests was processed with an error
func (*MultiClient) WaitUntilRequestProcessed ¶
func (m *MultiClient) WaitUntilRequestProcessed(chainID isc.ChainID, reqID isc.RequestID, waitForL1Confirmation bool, timeout time.Duration) (*apiclient.ReceiptResponse, error)
WaitUntilRequestProcessed blocks until the request has been processed by all nodes
func (*MultiClient) WaitUntilRequestProcessedSuccessfully ¶
func (m *MultiClient) WaitUntilRequestProcessedSuccessfully(chainID isc.ChainID, reqID isc.RequestID, waitForL1Confirmation bool, timeout time.Duration) (*apiclient.ReceiptResponse, error)
WaitUntilRequestProcessedSuccessfully is similar to WaitUntilRequestProcessed, but also checks the receipt and return an error if the request was processed with an error