Documentation ¶
Index ¶
- Constants
- Variables
- func GetRawTxHex(input TransactionInput, pub string) string
- func NewAddress(privateKeyHex string) (string, error)
- func NewTransaction(input TransactionInput, privateKeyHex string) string
- func NewTransactionWithTypeUrl(input TransactionInput, privateKeyHex string) string
- func Sign(rawHex string, privateKeyHex string) string
- func SignEnd(rawHex string, signHex string) string
- func ValidateAddress(address string) bool
- type MsgExecuteContract
- func (m *MsgExecuteContract) Marshal() (dAtA []byte, err error)
- func (m *MsgExecuteContract) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgExecuteContract) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (m *MsgExecuteContract) MessageName() string
- func (m *MsgExecuteContract) Size() (n int)
- func (m *MsgExecuteContract) Unmarshal(dAtA []byte) error
- type MsgSwap
- type MsgSwapSend
- func (m *MsgSwapSend) Marshal() (dAtA []byte, err error)
- func (m *MsgSwapSend) MarshalTo(dAtA []byte) (int, error)
- func (m *MsgSwapSend) MarshalToSizedBuffer(dAtA []byte) (int, error)
- func (m *MsgSwapSend) MessageName() string
- func (m *MsgSwapSend) Size() (n int)
- func (m *MsgSwapSend) Unmarshal(dAtA []byte) error
- type TransactionInput
- func (m *TransactionInput) AppendContractMsg(sender string, contract string, executeMsg string, coins *types.Coins)
- func (m *TransactionInput) AppendFeeCoin(demon string, amount *big.Int)
- func (m *TransactionInput) AppendSendMsg(from string, to string, coins *types.Coins)
- func (m *TransactionInput) AppendSwapMsg(trader string, askDemon string, demon string, amount *big.Int)
Constants ¶
View Source
const (
HRP = "terra"
)
Variables ¶
Functions ¶
func GetRawTxHex ¶
func GetRawTxHex(input TransactionInput, pub string) string
func NewAddress ¶
func NewTransaction ¶
func NewTransaction(input TransactionInput, privateKeyHex string) string
func NewTransactionWithTypeUrl ¶
func NewTransactionWithTypeUrl(input TransactionInput, privateKeyHex string) string
func ValidateAddress ¶
Types ¶
type MsgExecuteContract ¶
type MsgExecuteContract struct { // Sender is the that actor that signed the messages Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty" yaml:"sender"` // Contract is the address of the smart contract Contract string `protobuf:"bytes,2,opt,name=contract,proto3" json:"contract,omitempty" yaml:"contract"` // ExecuteMsg json encoded message to be passed to the contract ExecuteMsg json.RawMessage `` /* 144-byte string literal not displayed */ // Coins that are transferred to the contract on execution Coins types.Coins `protobuf:"bytes,5,rep,name=coins,proto3,castrepeated=github.com/cosmos/cosmos-sdk/types.Coins" json:"coins" yaml:"coins"` }
MsgExecuteContract represents a message to submits the given message data to a smart contract.
func (*MsgExecuteContract) Marshal ¶
func (m *MsgExecuteContract) Marshal() (dAtA []byte, err error)
func (*MsgExecuteContract) MarshalTo ¶
func (m *MsgExecuteContract) MarshalTo(dAtA []byte) (int, error)
func (*MsgExecuteContract) MarshalToSizedBuffer ¶
func (m *MsgExecuteContract) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgExecuteContract) MessageName ¶
func (m *MsgExecuteContract) MessageName() string
func (*MsgExecuteContract) Size ¶
func (m *MsgExecuteContract) Size() (n int)
func (*MsgExecuteContract) Unmarshal ¶
func (m *MsgExecuteContract) Unmarshal(dAtA []byte) error
type MsgSwap ¶
type MsgSwap struct { Trader string `protobuf:"bytes,1,opt,name=trader,proto3" json:"trader,omitempty" yaml:"trader"` OfferCoin types.Coin `protobuf:"bytes,2,opt,name=offer_coin,json=offerCoin,proto3" json:"offer_coin" yaml:"offer_coin"` AskDenom string `protobuf:"bytes,3,opt,name=ask_denom,json=askDenom,proto3" json:"ask_denom,omitempty" yaml:"ask_denom"` }
MsgSwap represents a message to swap coin to another denom.
func (*MsgSwap) MarshalToSizedBuffer ¶
func (*MsgSwap) MessageName ¶
type MsgSwapSend ¶
type MsgSwapSend struct { FromAddress string `protobuf:"bytes,1,opt,name=from_address,json=fromAddress,proto3" json:"from_address,omitempty" yaml:"from_address"` ToAddress string `protobuf:"bytes,2,opt,name=to_address,json=toAddress,proto3" json:"to_address,omitempty" yaml:"to_address"` OfferCoin types.Coin `protobuf:"bytes,3,opt,name=offer_coin,json=offerCoin,proto3" json:"offer_coin" yaml:"offer_coin"` AskDenom string `protobuf:"bytes,4,opt,name=ask_denom,json=askDenom,proto3" json:"ask_denom,omitempty" yaml:"ask_denom"` }
MsgSwapSend represents a message to swap coin and send all result coin to recipient
func (*MsgSwapSend) Marshal ¶
func (m *MsgSwapSend) Marshal() (dAtA []byte, err error)
func (*MsgSwapSend) MarshalToSizedBuffer ¶
func (m *MsgSwapSend) MarshalToSizedBuffer(dAtA []byte) (int, error)
func (*MsgSwapSend) MessageName ¶
func (m *MsgSwapSend) MessageName() string
func (*MsgSwapSend) Size ¶
func (m *MsgSwapSend) Size() (n int)
func (*MsgSwapSend) Unmarshal ¶
func (m *MsgSwapSend) Unmarshal(dAtA []byte) error
type TransactionInput ¶
type TransactionInput struct { ChainId string Memo string Sequence uint64 AccountNumber uint64 Fee types.Coins GasLimit uint64 SendArray []types.MsgSend SwapArray []MsgSwap ContractArray []MsgExecuteContract }
func (*TransactionInput) AppendContractMsg ¶
func (*TransactionInput) AppendFeeCoin ¶
func (m *TransactionInput) AppendFeeCoin(demon string, amount *big.Int)
func (*TransactionInput) AppendSendMsg ¶
func (m *TransactionInput) AppendSendMsg(from string, to string, coins *types.Coins)
func (*TransactionInput) AppendSwapMsg ¶
Click to show internal directories.
Click to hide internal directories.