chains

package
v0.0.1-gowrapper-test Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 30, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL