Documentation ¶
Overview ¶
Copyright 2016 All in Bits, Inc
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- func LoadWormchainPrivKey(path string, passPhrase string) (cryptotypes.PrivKey, error)
- type ClientConn
- func (c *ClientConn) BroadcastTxResponseToString(txResp *sdktx.BroadcastTxResponse) string
- func (c *ClientConn) Close()
- func (c *ClientConn) SenderAddress() string
- func (c *ClientConn) SignAndBroadcastTx(ctx context.Context, msg sdktypes.Msg) (*sdktx.BroadcastTxResponse, error)
- func (c *ClientConn) SubmitQuery(ctx context.Context, contractAddress string, query []byte) ([]byte, error)
- type EncodingConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadWormchainPrivKey ¶
func LoadWormchainPrivKey(path string, passPhrase string) (cryptotypes.PrivKey, error)
Types ¶
type ClientConn ¶
type ClientConn struct {
// contains filtered or unexported fields
}
ClienConn represents a connection to a wormhole-chain endpoint, encapsulating interactions with the chain.
Once a connection is established, users must call ClientConn.Close to terminate the connection and free up resources.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewConn ¶
func NewConn(ctx context.Context, target string, privateKey cryptotypes.PrivKey, chainId string) (*ClientConn, error)
NewConn creates a new connection to the wormhole-chain instance at `target`.
func (*ClientConn) BroadcastTxResponseToString ¶
func (c *ClientConn) BroadcastTxResponseToString(txResp *sdktx.BroadcastTxResponse) string
func (*ClientConn) Close ¶
func (c *ClientConn) Close()
Close terminates the connection and frees up resources.
func (*ClientConn) SenderAddress ¶
func (c *ClientConn) SenderAddress() string
func (*ClientConn) SignAndBroadcastTx ¶
func (c *ClientConn) SignAndBroadcastTx(ctx context.Context, msg sdktypes.Msg) (*sdktx.BroadcastTxResponse, error)
func (*ClientConn) SubmitQuery ¶
func (c *ClientConn) SubmitQuery(ctx context.Context, contractAddress string, query []byte) ([]byte, error)
SubmitQuery submits a query to a smart contract and returns the result.
type EncodingConfig ¶
type EncodingConfig struct { InterfaceRegistry types.InterfaceRegistry Marshaler codec.Codec TxConfig client.TxConfig Amino *codec.LegacyAmino }
EncodingConfig specifies the concrete encoding types to use for a given app. This is provided for compatibility between protobuf and amino implementations.
func MakeEncodingConfig ¶
func MakeEncodingConfig(moduleBasics module.BasicManager) EncodingConfig
MakeEncodingConfig creates an EncodingConfig for testing