Documentation ¶
Index ¶
- Variables
- func CreateEIP712CosmosTx(ctx sdk.Context, appXte *app.XteApp, args EIP712TxArgs) (sdk.Tx, error)
- func NewSigner(sk cryptotypes.PrivKey) keyring.Signer
- func PrepareCosmosTx(ctx sdk.Context, appXte *app.XteApp, args CosmosTxArgs) (authsigning.Tx, error)
- func PrepareEIP712CosmosTx(ctx sdk.Context, appXte *app.XteApp, args EIP712TxArgs) (client.TxBuilder, error)
- type CosmosTxArgs
- type EIP712TxArgs
- type Signer
Constants ¶
This section is empty.
Variables ¶
var (
DefaultFee = sdk.NewCoin(evmtypes.DefaultEVMDenom, sdk.NewIntFromUint64(uint64(feeAmt)))
)
Functions ¶
func CreateEIP712CosmosTx ¶
func CreateEIP712CosmosTx( ctx sdk.Context, appXte *app.XteApp, args EIP712TxArgs, ) (sdk.Tx, error)
CreateEIP712CosmosTx creates a cosmos tx for typed data according to EIP712. Also, signs the tx with the provided messages and private key. It returns the signed transaction and an error
func PrepareCosmosTx ¶
func PrepareCosmosTx( ctx sdk.Context, appXte *app.XteApp, args CosmosTxArgs, ) (authsigning.Tx, error)
PrepareCosmosTx creates a cosmos tx and signs it with the provided messages and private key. It returns the signed transaction and an error
func PrepareEIP712CosmosTx ¶
func PrepareEIP712CosmosTx( ctx sdk.Context, appXte *app.XteApp, args EIP712TxArgs, ) (client.TxBuilder, error)
PrepareEIP712CosmosTx creates a cosmos tx for typed data according to EIP712. Also, signs the tx with the provided messages and private key. It returns the tx builder with the signed transaction and an error
Types ¶
type CosmosTxArgs ¶
type CosmosTxArgs struct { // TxCfg is the client transaction config TxCfg client.TxConfig // Priv is the private key that will be used to sign the tx Priv cryptotypes.PrivKey // ChainID is the chain's id on cosmos format, e.g. 'xtechain_9527-1' ChainID string // Gas to be used on the tx Gas uint64 // GasPrice to use on tx GasPrice *sdkmath.Int // Fees is the fee to be used on the tx (amount and denom) Fees sdk.Coins // FeeGranter is the account address of the fee granter FeeGranter sdk.AccAddress // Msgs slice of messages to include on the tx Msgs []sdk.Msg }
CosmosTxArgs contains the params to create a cosmos tx
type EIP712TxArgs ¶
type EIP712TxArgs struct { CosmosTxArgs CosmosTxArgs UseLegacyTypedData bool UseLegacyExtension bool }
type Signer ¶
type Signer struct {
// contains filtered or unexported fields
}
Signer defines a type that is used on testing for signing MsgEthereumTx
func (Signer) SignByAddress ¶
SignByAddress sign byte messages with a user key providing the address.