Documentation
¶
Index ¶
- type CosmosChain
- func (c *CosmosChain) BuildSigningInput(accountNumber uint64, sequence uint64, chainId string, memo string, ...) (*cosmos.SigningInput, error)
- func (c *CosmosChain) CompileTransaction(input *chain_abstraction.TransactionInput, signatures [][]byte, ...) ([]byte, error)
- func (c *CosmosChain) CreateAndSignTransaction(input interface{}, privateKey []byte) ([]byte, error)
- func (c *CosmosChain) GetPreimageHash(input *chain_abstraction.TransactionInput) ([]byte, []byte, error)
- func (c *CosmosChain) GetTransactionHash(encodedTx []byte) (string, error)
- func (c *CosmosChain) PrepareTransaction(input interface{}) (*chain_abstraction.TransactionInput, error)
- func (c *CosmosChain) Sign(preimage []byte, privateKey []byte) ([]byte, error)
- func (c *CosmosChain) ValidateTransactionInput(input interface{}) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CosmosChain ¶
type CosmosChain struct {
*chain_abstraction.BaseChain
}
CosmosChain implements the Chain interface for Cosmos
func NewCosmosChain ¶
func NewCosmosChain() *CosmosChain
NewCosmosChain creates a new Cosmos chain instance
func (*CosmosChain) BuildSigningInput ¶
func (c *CosmosChain) BuildSigningInput( accountNumber uint64, sequence uint64, chainId string, memo string, fromAddress string, toAddress string, amount string, denom string, gas uint64, feeAmount string, feeDenom string, privateKey []byte, ) (*cosmos.SigningInput, error)
BuildSigningInput creates a Cosmos signing input from basic parameters
func (*CosmosChain) CompileTransaction ¶
func (c *CosmosChain) CompileTransaction( input *chain_abstraction.TransactionInput, signatures [][]byte, publicKeys [][]byte, ) ([]byte, error)
CompileTransaction compiles a transaction with external signatures
func (*CosmosChain) CreateAndSignTransaction ¶
func (c *CosmosChain) CreateAndSignTransaction(input interface{}, privateKey []byte) ([]byte, error)
CreateAndSignTransaction creates and signs a Cosmos transaction
func (*CosmosChain) GetPreimageHash ¶
func (c *CosmosChain) GetPreimageHash(input *chain_abstraction.TransactionInput) ([]byte, []byte, error)
GetPreimageHash gets the preimage hash for external signing
func (*CosmosChain) GetTransactionHash ¶
func (c *CosmosChain) GetTransactionHash(encodedTx []byte) (string, error)
GetTransactionHash gets the transaction hash
func (*CosmosChain) PrepareTransaction ¶
func (c *CosmosChain) PrepareTransaction(input interface{}) (*chain_abstraction.TransactionInput, error)
PrepareTransaction prepares a Cosmos transaction for external signing
func (*CosmosChain) Sign ¶
func (c *CosmosChain) Sign(preimage []byte, privateKey []byte) ([]byte, error)
Sign signs data with a private key
func (*CosmosChain) ValidateTransactionInput ¶
func (c *CosmosChain) ValidateTransactionInput(input interface{}) error
ValidateTransactionInput validates Cosmos transaction input
Click to show internal directories.
Click to hide internal directories.