ChainClient
A generic interface for interacting with any Cosmos chain.
Methods
connect
Connects to the given chain. Assigns all clients used within the chain client, if a signer is provided a signing client is assigned.
disconnect
Disconnects from the current chain completely.
sign
Signs a given message with the connected signer.
broadcast
Broadcasts a given transaction to the connected chain.
signAndBroadcast
Signs a given message before broadcasting it to the connected chain.
simulateMulti
Simulates all given messages and returns a gas fee estimate.
simulate
Simulates a given message and returns a gas fee estimate.
execute
Executes a message on the specified contract.
simulateExecute
Simulates an execute message and returns a gas fee estimate.
upload
Uploads given contract code (Uint8Array) to the chain.
simulateUpload
Simulates an upload message and returns a gas fee estimate.
instantiate
Instantiates a contract with the given code id using the provided instantiate message.
simulateInstantiate
Simulates an instantiation message and returns a gas fee estimate.
migrate
Migrates a contract to a given code id.
simulateMigrate
Simulates a migrate message for a given contract address, code id and migrate message and returns a gas estimate.
encodeExecuteMsg
Converts an execute message to an EncodeObject for signing or simulating.
encodeInstantiateMsg
Converts an instantiate message to an EncodeObject for signing or simulating.
encodeUploadMessage
Converts an upload message to an EncodeObject for signing or simulating.
encodeMigrateMessage
Converts a migrate message to an EncodeObject for signing or simulating.
encodeSendMessage
Converts a sendTokens message to an EncodeObject for signing or simulating.
sendTokens
Sends tokens from the signing address to the provided receiving address.
Last updated