Documentation ¶
Index ¶
- type RequestManager
- func (requestManager *RequestManager) MustPost(requesterKeyPair *ed25519.KeyPair, chain *solo.Chain, contractName string, ...) dict.Dict
- func (requestManager *RequestManager) MustPostFail(requesterKeyPair *ed25519.KeyPair, chain *solo.Chain, contractName string, ...)
- func (requestManager *RequestManager) MustPostWithTransfer(requesterKeyPair *ed25519.KeyPair, color colored.Color, amount uint64, ...) dict.Dict
- func (requestManager *RequestManager) MustPostWithTransferFail(requesterKeyPair *ed25519.KeyPair, color colored.Color, amount uint64, ...)
- func (requestManager *RequestManager) MustView(chain *solo.Chain, contractName string, functionName string, ...) dict.Dict
- func (requestManager *RequestManager) MustViewFail(chain *solo.Chain, contractName string, functionName string, ...)
- func (requestManager *RequestManager) Post(requesterKeyPair *ed25519.KeyPair, chain *solo.Chain, contractName string, ...) (dict.Dict, error)
- func (requestManager *RequestManager) PostWithTransfer(requesterKeyPair *ed25519.KeyPair, color colored.Color, amount uint64, ...) (dict.Dict, error)
- func (requestManager *RequestManager) View(chain *solo.Chain, contractName string, functionName string, ...) (dict.Dict, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RequestManager ¶
type RequestManager struct {
// contains filtered or unexported fields
}
RequestManager manipulates requests
func (*RequestManager) MustPost ¶
func (requestManager *RequestManager) MustPost(requesterKeyPair *ed25519.KeyPair, chain *solo.Chain, contractName string, functionName string, params ...interface{}) dict.Dict
MustPost creates a request to contract function in the chain as requester. 1 IOTA is necessary to process the request. Fails test if request fails.
func (*RequestManager) MustPostFail ¶
func (requestManager *RequestManager) MustPostFail(requesterKeyPair *ed25519.KeyPair, chain *solo.Chain, contractName string, functionName string)
MustPostFail creates a request to contract function in the chain as requester. Fails test if request succeeds.
func (*RequestManager) MustPostWithTransfer ¶ added in v0.9.2
func (requestManager *RequestManager) MustPostWithTransfer(requesterKeyPair *ed25519.KeyPair, color colored.Color, amount uint64, chain *solo.Chain, contractName string, functionName string, params ...interface{}) dict.Dict
MustPostWithTransfer creates a request to contract function in the chain as requester. It attaches 'amount' of 'color' to call. Fails test if request fails.
func (*RequestManager) MustPostWithTransferFail ¶ added in v0.9.2
func (requestManager *RequestManager) MustPostWithTransferFail(requesterKeyPair *ed25519.KeyPair, color colored.Color, amount uint64, chain *solo.Chain, contractName string, functionName string)
MustPostWithTransferFail creates a request to contract function in the chain as requester. It attaches 'amount' of 'color' to call. Fails test if request succeeds.
func (*RequestManager) MustView ¶
func (requestManager *RequestManager) MustView(chain *solo.Chain, contractName string, functionName string, params ...interface{}) dict.Dict
MustView creates a view request. The contract view in the chain is called with optional params. Returns response as a Dict. Fails test on error.
func (*RequestManager) MustViewFail ¶
func (requestManager *RequestManager) MustViewFail(chain *solo.Chain, contractName string, functionName string, params ...interface{})
MustViewFail creates a view request. The contract view in the chain is called with optional params. Fails test if request succeeds.
func (*RequestManager) Post ¶
func (requestManager *RequestManager) Post(requesterKeyPair *ed25519.KeyPair, chain *solo.Chain, contractName string, functionName string, params ...interface{}) (dict.Dict, error)
Post creates a request as requester or, if not specified, as the chain originator. 1 IOTA is necessary to process the request. The contract function in the chain is called with optional params. Returns response as a Dict or an error.
func (*RequestManager) PostWithTransfer ¶ added in v0.9.2
func (requestManager *RequestManager) PostWithTransfer(requesterKeyPair *ed25519.KeyPair, color colored.Color, amount uint64, chain *solo.Chain, contractName string, functionName string, params ...interface{}) (dict.Dict, error)
PostWithTransfer creates a request as requester or, if not specified, as the chain originator. The contract function in the chain is called with optional params. It attaches 'amount' of 'color' to call. Returns response as a Dict or an error.
func (*RequestManager) View ¶
func (requestManager *RequestManager) View(chain *solo.Chain, contractName string, functionName string, params ...interface{}) (dict.Dict, error)
View creates a view request. The contract view in the chain is called with optional params. Returns response as a Dict or an error.