Documentation
¶
Index ¶
- Variables
- func GenerateTypedDataAndVerifySignatureEIP712(pubKey cryptotypes.PubKey, signerData authsigning.SignerData, ...) (*typeddata.TypedData, error)
- func WrapTxToEIP712AminoJSON(cdc codec.ProtoCodecMarshaler, tx authsigning.Tx, ...) (typeddata.TypedData, error)
- func WrapTxToEIP712LegacyAmino(cdc codec.ProtoCodecMarshaler, tx authsigning.Tx, ...) (typeddata.TypedData, error)
- func WrapTxToEIP712V2(cdc codec.ProtoCodecMarshaler, tx authsigning.Tx, ...) (typeddata.TypedData, error)
- func WrapTxToEIP712WithSignBytes(signBytes []byte, cdc codec.ProtoCodecMarshaler, chainID int64, ...) (typeddata.TypedData, error)
- type EIP712Wrapper
- type Eip712SigVerificationDecorator
- type Web3ExtensionOptions
Constants ¶
This section is empty.
Variables ¶
var (
GlobalCdc = codec.NewProtoCodec(injcodectypes.NewInterfaceRegistry())
)
Functions ¶
func GenerateTypedDataAndVerifySignatureEIP712 ¶ added in v1.58.0
func GenerateTypedDataAndVerifySignatureEIP712( pubKey cryptotypes.PubKey, signerData authsigning.SignerData, sigData signing.SignatureData, tx authsigning.Tx, ) (*typeddata.TypedData, error)
VerifySignature verifies a transaction signature contained in SignatureData abstracting over different signing modes and single vs multi-signatures.
func WrapTxToEIP712AminoJSON ¶ added in v1.58.0
func WrapTxToEIP712AminoJSON( cdc codec.ProtoCodecMarshaler, tx authsigning.Tx, authSignerData *authsigning.SignerData, opts Web3ExtensionOptions, ) (typeddata.TypedData, error)
WrapTxToEIP712AminoJSON is an ultimate method that wraps aminojson-encoded Cosmos Tx JSON data into an EIP712-compatible request. All messages must be of the same type.
func WrapTxToEIP712LegacyAmino ¶ added in v1.58.0
func WrapTxToEIP712LegacyAmino( cdc codec.ProtoCodecMarshaler, tx authsigning.Tx, signerData *authsigning.SignerData, opts Web3ExtensionOptions, ) (typeddata.TypedData, error)
WrapTxToEIP712LegacyAmino is the method previously used to generate EIP712 typed data (until sdk v0.50)
func WrapTxToEIP712V2 ¶ added in v1.47.15
func WrapTxToEIP712V2( cdc codec.ProtoCodecMarshaler, tx authsigning.Tx, signerData *authsigning.SignerData, opts Web3ExtensionOptions, ) (typeddata.TypedData, error)
func WrapTxToEIP712WithSignBytes ¶ added in v1.58.0
func WrapTxToEIP712WithSignBytes( signBytes []byte, cdc codec.ProtoCodecMarshaler, chainID int64, msgs []cosmtypes.Msg, feePayer cosmtypes.AccAddress, timeoutHeight uint64, ) (typeddata.TypedData, error)
WrapTxToEIP712WithSignBytes wraps provided signBytes to EIP712 TypedData
Types ¶
type EIP712Wrapper ¶ added in v1.47.15
type EIP712Wrapper func( cdc codec.ProtoCodecMarshaler, tx authsigning.Tx, signerData *authsigning.SignerData, opts Web3ExtensionOptions, ) (typeddata.TypedData, error)
type Eip712SigVerificationDecorator ¶ added in v1.58.0
type Eip712SigVerificationDecorator struct {
// contains filtered or unexported fields
}
Verify all signatures for a tx and return an error if any are invalid. Note, the Eip712SigVerificationDecorator decorator will not get executed on ReCheck.
CONTRACT: Pubkeys are set in context for all signers before this decorator runs CONTRACT: Tx must implement SigVerifiableTx interface
func NewEip712SigVerificationDecorator ¶ added in v1.58.0
func NewEip712SigVerificationDecorator(ak authante.AccountKeeper) Eip712SigVerificationDecorator
func (Eip712SigVerificationDecorator) AnteHandle ¶ added in v1.58.0
type Web3ExtensionOptions ¶ added in v1.58.0
type Web3ExtensionOptions struct { ChainID int64 FeePayer sdk.AccAddress FeePayerSig []byte }
func GetWeb3ExtensionOptions ¶ added in v1.58.0
func GetWeb3ExtensionOptions(tx authsigning.Tx, signerData authsigning.SignerData) (Web3ExtensionOptions, error)