ethereum

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: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	TransactionMode_name = map[int32]string{
		0: "Legacy",
		1: "Enveloped",
		2: "UserOp",
		4: "SetCode",
	}
	TransactionMode_value = map[string]int32{
		"Legacy":    0,
		"Enveloped": 1,
		"UserOp":    2,
		"SetCode":   4,
	}
)

Enum value maps for TransactionMode.

View Source
var (
	SCWalletType_name = map[int32]string{
		0: "SimpleAccount",
		1: "Biz4337",
		2: "Biz",
	}
	SCWalletType_value = map[string]int32{
		"SimpleAccount": 0,
		"Biz4337":       1,
		"Biz":           2,
	}
)

Enum value maps for SCWalletType.

View Source
var (
	MessageType_name = map[int32]string{
		0: "MessageType_legacy",
		1: "MessageType_eip155",
		2: "MessageType_typed",
		3: "MessageType_typed_eip155",
		4: "MessageType_immutable_x",
		5: "MessageType_eip7702_authorization",
	}
	MessageType_value = map[string]int32{
		"MessageType_legacy":                0,
		"MessageType_eip155":                1,
		"MessageType_typed":                 2,
		"MessageType_typed_eip155":          3,
		"MessageType_immutable_x":           4,
		"MessageType_eip7702_authorization": 5,
	}
)

Enum value maps for MessageType.

View Source
var File_Ethereum_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type Access

type Access struct {

	// Address to be accessed by the transaction.
	Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
	// Storage keys to be accessed by the transaction.
	StoredKeys [][]byte `protobuf:"bytes,2,rep,name=stored_keys,json=storedKeys,proto3" json:"stored_keys,omitempty"`
	// contains filtered or unexported fields
}

An item of the [EIP-2930](https://eips.ethereum.org/EIPS/eip-2930) access list.

func (*Access) Descriptor deprecated

func (*Access) Descriptor() ([]byte, []int)

Deprecated: Use Access.ProtoReflect.Descriptor instead.

func (*Access) GetAddress

func (x *Access) GetAddress() string

func (*Access) GetStoredKeys

func (x *Access) GetStoredKeys() [][]byte

func (*Access) ProtoMessage

func (*Access) ProtoMessage()

func (*Access) ProtoReflect

func (x *Access) ProtoReflect() protoreflect.Message

func (*Access) Reset

func (x *Access) Reset()

func (*Access) String

func (x *Access) String() string

type Authorization

type Authorization struct {

	// Address to be authorized, a smart contract address.
	Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"`
	// If custom_signature isn't provided, the authorization will be signed with the provided private key, nonce and chainId
	CustomSignature *AuthorizationCustomSignature `protobuf:"bytes,3,opt,name=custom_signature,json=customSignature,proto3" json:"custom_signature,omitempty"`
	// contains filtered or unexported fields
}

[EIP-7702](https://eips.ethereum.org/EIPS/eip-7702) authorization.

func (*Authorization) Descriptor deprecated

func (*Authorization) Descriptor() ([]byte, []int)

Deprecated: Use Authorization.ProtoReflect.Descriptor instead.

func (*Authorization) GetAddress

func (x *Authorization) GetAddress() string

func (*Authorization) GetCustomSignature

func (x *Authorization) GetCustomSignature() *AuthorizationCustomSignature

func (*Authorization) ProtoMessage

func (*Authorization) ProtoMessage()

func (*Authorization) ProtoReflect

func (x *Authorization) ProtoReflect() protoreflect.Message

func (*Authorization) Reset

func (x *Authorization) Reset()

func (*Authorization) String

func (x *Authorization) String() string

type AuthorizationCustomSignature

type AuthorizationCustomSignature struct {

	// Chain id (uint256, serialized big endian).
	ChainId []byte `protobuf:"bytes,1,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"`
	// Nonce, the nonce of authority.
	Nonce []byte `protobuf:"bytes,2,opt,name=nonce,proto3" json:"nonce,omitempty"`
	// The signature, Hex-encoded.
	Signature string `protobuf:"bytes,3,opt,name=signature,proto3" json:"signature,omitempty"`
	// contains filtered or unexported fields
}

[EIP-7702](https://eips.ethereum.org/EIPS/eip-7702) authorization.

func (*AuthorizationCustomSignature) Descriptor deprecated

func (*AuthorizationCustomSignature) Descriptor() ([]byte, []int)

Deprecated: Use AuthorizationCustomSignature.ProtoReflect.Descriptor instead.

func (*AuthorizationCustomSignature) GetChainId

func (x *AuthorizationCustomSignature) GetChainId() []byte

func (*AuthorizationCustomSignature) GetNonce

func (x *AuthorizationCustomSignature) GetNonce() []byte

func (*AuthorizationCustomSignature) GetSignature

func (x *AuthorizationCustomSignature) GetSignature() string

func (*AuthorizationCustomSignature) ProtoMessage

func (*AuthorizationCustomSignature) ProtoMessage()

func (*AuthorizationCustomSignature) ProtoReflect

func (*AuthorizationCustomSignature) Reset

func (x *AuthorizationCustomSignature) Reset()

func (*AuthorizationCustomSignature) String

type MaybeChainId

type MaybeChainId struct {

	// Chain ID.
	ChainId uint64 `protobuf:"varint,3,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"`
	// contains filtered or unexported fields
}

func (*MaybeChainId) Descriptor deprecated

func (*MaybeChainId) Descriptor() ([]byte, []int)

Deprecated: Use MaybeChainId.ProtoReflect.Descriptor instead.

func (*MaybeChainId) GetChainId

func (x *MaybeChainId) GetChainId() uint64

func (*MaybeChainId) ProtoMessage

func (*MaybeChainId) ProtoMessage()

func (*MaybeChainId) ProtoReflect

func (x *MaybeChainId) ProtoReflect() protoreflect.Message

func (*MaybeChainId) Reset

func (x *MaybeChainId) Reset()

func (*MaybeChainId) String

func (x *MaybeChainId) String() string

type MessageSigningInput

type MessageSigningInput struct {

	// The secret private key used for signing (32 bytes).
	PrivateKey []byte `protobuf:"bytes,1,opt,name=private_key,json=privateKey,proto3" json:"private_key,omitempty"`
	// Message to sign. Either a regular message or a typed data structured message in JSON format.
	// Message type should be declared at `message_type`.
	Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
	// Optional. Used in replay protection and to check Typed Structured Data input.
	// Eg. should be set if `message_type` is `MessageType_eip155`, or MessageType_typed, or `MessageType_typed_eip155`.
	ChainId *MaybeChainId `protobuf:"bytes,3,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"`
	// Message type.
	MessageType MessageType `` /* 130-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*MessageSigningInput) Descriptor deprecated

func (*MessageSigningInput) Descriptor() ([]byte, []int)

Deprecated: Use MessageSigningInput.ProtoReflect.Descriptor instead.

func (*MessageSigningInput) GetChainId

func (x *MessageSigningInput) GetChainId() *MaybeChainId

func (*MessageSigningInput) GetMessage

func (x *MessageSigningInput) GetMessage() string

func (*MessageSigningInput) GetMessageType

func (x *MessageSigningInput) GetMessageType() MessageType

func (*MessageSigningInput) GetPrivateKey

func (x *MessageSigningInput) GetPrivateKey() []byte

func (*MessageSigningInput) ProtoMessage

func (*MessageSigningInput) ProtoMessage()

func (*MessageSigningInput) ProtoReflect

func (x *MessageSigningInput) ProtoReflect() protoreflect.Message

func (*MessageSigningInput) Reset

func (x *MessageSigningInput) Reset()

func (*MessageSigningInput) String

func (x *MessageSigningInput) String() string

type MessageSigningOutput

type MessageSigningOutput struct {

	// The signature, Hex-encoded.
	Signature string `protobuf:"bytes,1,opt,name=signature,proto3" json:"signature,omitempty"`
	// error code, 0 is ok, other codes will be treated as errors
	Error common.SigningError `protobuf:"varint,2,opt,name=error,proto3,enum=TW.Common.Proto.SigningError" json:"error,omitempty"`
	// error code description
	ErrorMessage string `protobuf:"bytes,3,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"`
	// contains filtered or unexported fields
}

func (*MessageSigningOutput) Descriptor deprecated

func (*MessageSigningOutput) Descriptor() ([]byte, []int)

Deprecated: Use MessageSigningOutput.ProtoReflect.Descriptor instead.

func (*MessageSigningOutput) GetError

func (*MessageSigningOutput) GetErrorMessage

func (x *MessageSigningOutput) GetErrorMessage() string

func (*MessageSigningOutput) GetSignature

func (x *MessageSigningOutput) GetSignature() string

func (*MessageSigningOutput) ProtoMessage

func (*MessageSigningOutput) ProtoMessage()

func (*MessageSigningOutput) ProtoReflect

func (x *MessageSigningOutput) ProtoReflect() protoreflect.Message

func (*MessageSigningOutput) Reset

func (x *MessageSigningOutput) Reset()

func (*MessageSigningOutput) String

func (x *MessageSigningOutput) String() string

type MessageType

type MessageType int32
const (
	// Sign a message following EIP-191.
	MessageType_MessageType_legacy MessageType = 0
	// Sign a message following EIP-191 with EIP-155 replay attack protection.
	MessageType_MessageType_eip155 MessageType = 1
	// Sign a typed message EIP-712 V4.
	MessageType_MessageType_typed MessageType = 2
	// Sign a typed message EIP-712 V4 with EIP-155 replay attack protection.
	MessageType_MessageType_typed_eip155 MessageType = 3
	// Sign a message with Immutable X msg type.
	MessageType_MessageType_immutable_x MessageType = 4
	// Sign a EIP-7702 authorization tuple.
	MessageType_MessageType_eip7702_authorization MessageType = 5
)

func (MessageType) Descriptor

func (MessageType) Enum

func (x MessageType) Enum() *MessageType

func (MessageType) EnumDescriptor deprecated

func (MessageType) EnumDescriptor() ([]byte, []int)

Deprecated: Use MessageType.Descriptor instead.

func (MessageType) Number

func (x MessageType) Number() protoreflect.EnumNumber

func (MessageType) String

func (x MessageType) String() string

func (MessageType) Type

type MessageVerifyingInput

type MessageVerifyingInput struct {

	// The message signed.
	Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
	// Public key that will verify and recover the message from the signature.
	PublicKey []byte `protobuf:"bytes,2,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"`
	// The signature, Hex-encoded.
	Signature string `protobuf:"bytes,3,opt,name=signature,proto3" json:"signature,omitempty"`
	// contains filtered or unexported fields
}

func (*MessageVerifyingInput) Descriptor deprecated

func (*MessageVerifyingInput) Descriptor() ([]byte, []int)

Deprecated: Use MessageVerifyingInput.ProtoReflect.Descriptor instead.

func (*MessageVerifyingInput) GetMessage

func (x *MessageVerifyingInput) GetMessage() string

func (*MessageVerifyingInput) GetPublicKey

func (x *MessageVerifyingInput) GetPublicKey() []byte

func (*MessageVerifyingInput) GetSignature

func (x *MessageVerifyingInput) GetSignature() string

func (*MessageVerifyingInput) ProtoMessage

func (*MessageVerifyingInput) ProtoMessage()

func (*MessageVerifyingInput) ProtoReflect

func (x *MessageVerifyingInput) ProtoReflect() protoreflect.Message

func (*MessageVerifyingInput) Reset

func (x *MessageVerifyingInput) Reset()

func (*MessageVerifyingInput) String

func (x *MessageVerifyingInput) String() string

type SCWalletType

type SCWalletType int32

Smart Contract Wallet type.

const (
	// ERC-4337 compatible smart contract wallet.
	// https://github.com/eth-infinitism/account-abstraction/blob/develop/contracts/accounts/SimpleAccount.sol
	SCWalletType_SimpleAccount SCWalletType = 0
	// Biz smart contract (Trust Wallet specific) through ERC-4337 EntryPoint.
	SCWalletType_Biz4337 SCWalletType = 1
	// Biz smart contract (Trust Wallet specific) directly through ERC-7702.
	SCWalletType_Biz SCWalletType = 2
)

func (SCWalletType) Descriptor

func (SCWalletType) Enum

func (x SCWalletType) Enum() *SCWalletType

func (SCWalletType) EnumDescriptor deprecated

func (SCWalletType) EnumDescriptor() ([]byte, []int)

Deprecated: Use SCWalletType.Descriptor instead.

func (SCWalletType) Number

func (SCWalletType) String

func (x SCWalletType) String() string

func (SCWalletType) Type

type SigningInput

type SigningInput struct {

	// Chain identifier (uint256, serialized big endian)
	ChainId []byte `protobuf:"bytes,1,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"`
	// Nonce (uint256, serialized big endian)
	Nonce []byte `protobuf:"bytes,2,opt,name=nonce,proto3" json:"nonce,omitempty"`
	// Transaction version selector: Legacy or enveloped, has impact on fee structure.
	// Default is Legacy (value 0)
	TxMode TransactionMode `protobuf:"varint,3,opt,name=tx_mode,json=txMode,proto3,enum=TW.Ethereum.Proto.TransactionMode" json:"tx_mode,omitempty"`
	// Gas price (uint256, serialized big endian)
	// Relevant for legacy transactions only (disregarded for enveloped/EIP1559)
	GasPrice []byte `protobuf:"bytes,4,opt,name=gas_price,json=gasPrice,proto3" json:"gas_price,omitempty"`
	// Gas limit (uint256, serialized big endian)
	GasLimit []byte `protobuf:"bytes,5,opt,name=gas_limit,json=gasLimit,proto3" json:"gas_limit,omitempty"`
	// Maximum optional inclusion fee (aka tip) (uint256, serialized big endian)
	// Relevant for enveloped/EIP1559 transactions only, tx_mode=Enveloped, (disregarded for legacy)
	MaxInclusionFeePerGas []byte `` /* 130-byte string literal not displayed */
	// Maximum fee (uint256, serialized big endian)
	// Relevant for enveloped/EIP1559 transactions only, tx_mode=Enveloped, (disregarded for legacy)
	MaxFeePerGas []byte `protobuf:"bytes,7,opt,name=max_fee_per_gas,json=maxFeePerGas,proto3" json:"max_fee_per_gas,omitempty"`
	// Recipient's address.
	// TODO currently, will be moved to each `Transaction` oneof soon.
	ToAddress string `protobuf:"bytes,8,opt,name=to_address,json=toAddress,proto3" json:"to_address,omitempty"`
	// The secret private key used for signing (32 bytes).
	PrivateKey []byte `protobuf:"bytes,9,opt,name=private_key,json=privateKey,proto3" json:"private_key,omitempty"`
	// The payload transaction
	Transaction *Transaction `protobuf:"bytes,10,opt,name=transaction,proto3" json:"transaction,omitempty"`
	// UserOperation for ERC-4337 wallets
	//
	// Types that are valid to be assigned to UserOperationOneof:
	//
	//	*SigningInput_UserOperation
	//	*SigningInput_UserOperationV0_7
	UserOperationOneof isSigningInput_UserOperationOneof `protobuf_oneof:"user_operation_oneof"`
	// Optional list of addresses and storage keys that the transaction plans to access.
	// Used in `TransactionMode::Enveloped` only.
	AccessList []*Access `protobuf:"bytes,12,rep,name=access_list,json=accessList,proto3" json:"access_list,omitempty"`
	// EIP7702 authorization.
	// Used in `TransactionMode::SetOp` or `TransactionMode::UserOp`.
	// Currently, we support delegation to only one authority at a time.
	Eip7702Authorization *Authorization `protobuf:"bytes,15,opt,name=eip7702_authorization,json=eip7702Authorization,proto3" json:"eip7702_authorization,omitempty"`
	// contains filtered or unexported fields
}

Input data necessary to create a signed transaction. Legacy and EIP2718/EIP1559 transactions supported, see TransactionMode.

func (*SigningInput) Descriptor deprecated

func (*SigningInput) Descriptor() ([]byte, []int)

Deprecated: Use SigningInput.ProtoReflect.Descriptor instead.

func (*SigningInput) GetAccessList

func (x *SigningInput) GetAccessList() []*Access

func (*SigningInput) GetChainId

func (x *SigningInput) GetChainId() []byte

func (*SigningInput) GetEip7702Authorization

func (x *SigningInput) GetEip7702Authorization() *Authorization

func (*SigningInput) GetGasLimit

func (x *SigningInput) GetGasLimit() []byte

func (*SigningInput) GetGasPrice

func (x *SigningInput) GetGasPrice() []byte

func (*SigningInput) GetMaxFeePerGas

func (x *SigningInput) GetMaxFeePerGas() []byte

func (*SigningInput) GetMaxInclusionFeePerGas

func (x *SigningInput) GetMaxInclusionFeePerGas() []byte

func (*SigningInput) GetNonce

func (x *SigningInput) GetNonce() []byte

func (*SigningInput) GetPrivateKey

func (x *SigningInput) GetPrivateKey() []byte

func (*SigningInput) GetToAddress

func (x *SigningInput) GetToAddress() string

func (*SigningInput) GetTransaction

func (x *SigningInput) GetTransaction() *Transaction

func (*SigningInput) GetTxMode

func (x *SigningInput) GetTxMode() TransactionMode

func (*SigningInput) GetUserOperation

func (x *SigningInput) GetUserOperation() *UserOperation

func (*SigningInput) GetUserOperationOneof

func (x *SigningInput) GetUserOperationOneof() isSigningInput_UserOperationOneof

func (*SigningInput) GetUserOperationV0_7

func (x *SigningInput) GetUserOperationV0_7() *UserOperationV0_7

func (*SigningInput) ProtoMessage

func (*SigningInput) ProtoMessage()

func (*SigningInput) ProtoReflect

func (x *SigningInput) ProtoReflect() protoreflect.Message

func (*SigningInput) Reset

func (x *SigningInput) Reset()

func (*SigningInput) String

func (x *SigningInput) String() string

type SigningInput_UserOperation

type SigningInput_UserOperation struct {
	UserOperation *UserOperation `protobuf:"bytes,11,opt,name=user_operation,json=userOperation,proto3,oneof"`
}

type SigningInput_UserOperationV0_7

type SigningInput_UserOperationV0_7 struct {
	// EIP-7702 compatible
	UserOperationV0_7 *UserOperationV0_7 `protobuf:"bytes,13,opt,name=user_operation_v0_7,json=userOperationV07,proto3,oneof"`
}

type SigningOutput

type SigningOutput struct {

	// Signed and encoded transaction bytes.
	Encoded []byte `protobuf:"bytes,1,opt,name=encoded,proto3" json:"encoded,omitempty"`
	// The V, R, S components of the resulting signature, (each uint256, serialized big endian)
	V []byte `protobuf:"bytes,2,opt,name=v,proto3" json:"v,omitempty"`
	R []byte `protobuf:"bytes,3,opt,name=r,proto3" json:"r,omitempty"`
	S []byte `protobuf:"bytes,4,opt,name=s,proto3" json:"s,omitempty"`
	// The payload part, supplied in the input or assembled from input parameters
	Data []byte `protobuf:"bytes,5,opt,name=data,proto3" json:"data,omitempty"`
	// error code, 0 is ok, other codes will be treated as errors
	Error common.SigningError `protobuf:"varint,6,opt,name=error,proto3,enum=TW.Common.Proto.SigningError" json:"error,omitempty"`
	// error code description
	ErrorMessage string `protobuf:"bytes,7,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"`
	// Encoded transaction bytes.
	PreHash []byte `protobuf:"bytes,8,opt,name=pre_hash,json=preHash,proto3" json:"pre_hash,omitempty"`
	// contains filtered or unexported fields
}

Result containing the signed and encoded transaction.

func (*SigningOutput) Descriptor deprecated

func (*SigningOutput) Descriptor() ([]byte, []int)

Deprecated: Use SigningOutput.ProtoReflect.Descriptor instead.

func (*SigningOutput) GetData

func (x *SigningOutput) GetData() []byte

func (*SigningOutput) GetEncoded

func (x *SigningOutput) GetEncoded() []byte

func (*SigningOutput) GetError

func (x *SigningOutput) GetError() common.SigningError

func (*SigningOutput) GetErrorMessage

func (x *SigningOutput) GetErrorMessage() string

func (*SigningOutput) GetPreHash

func (x *SigningOutput) GetPreHash() []byte

func (*SigningOutput) GetR

func (x *SigningOutput) GetR() []byte

func (*SigningOutput) GetS

func (x *SigningOutput) GetS() []byte

func (*SigningOutput) GetV

func (x *SigningOutput) GetV() []byte

func (*SigningOutput) ProtoMessage

func (*SigningOutput) ProtoMessage()

func (*SigningOutput) ProtoReflect

func (x *SigningOutput) ProtoReflect() protoreflect.Message

func (*SigningOutput) Reset

func (x *SigningOutput) Reset()

func (*SigningOutput) String

func (x *SigningOutput) String() string

type Transaction

type Transaction struct {

	// Payload transfer
	//
	// Types that are valid to be assigned to TransactionOneof:
	//
	//	*Transaction_Transfer_
	//	*Transaction_Erc20Transfer
	//	*Transaction_Erc20Approve
	//	*Transaction_Erc721Transfer
	//	*Transaction_Erc1155Transfer
	//	*Transaction_ContractGeneric_
	//	*Transaction_ScwBatch
	//	*Transaction_ScwExecute
	TransactionOneof isTransaction_TransactionOneof `protobuf_oneof:"transaction_oneof"`
	// contains filtered or unexported fields
}

Transaction (transfer, smart contract call, ...)

func (*Transaction) Descriptor deprecated

func (*Transaction) Descriptor() ([]byte, []int)

Deprecated: Use Transaction.ProtoReflect.Descriptor instead.

func (*Transaction) GetContractGeneric

func (x *Transaction) GetContractGeneric() *Transaction_ContractGeneric

func (*Transaction) GetErc1155Transfer

func (x *Transaction) GetErc1155Transfer() *Transaction_ERC1155Transfer

func (*Transaction) GetErc20Approve

func (x *Transaction) GetErc20Approve() *Transaction_ERC20Approve

func (*Transaction) GetErc20Transfer

func (x *Transaction) GetErc20Transfer() *Transaction_ERC20Transfer

func (*Transaction) GetErc721Transfer

func (x *Transaction) GetErc721Transfer() *Transaction_ERC721Transfer

func (*Transaction) GetScwBatch

func (x *Transaction) GetScwBatch() *Transaction_SCWalletBatch

func (*Transaction) GetScwExecute

func (x *Transaction) GetScwExecute() *Transaction_SCWalletExecute

func (*Transaction) GetTransactionOneof

func (x *Transaction) GetTransactionOneof() isTransaction_TransactionOneof

func (*Transaction) GetTransfer

func (x *Transaction) GetTransfer() *Transaction_Transfer

func (*Transaction) ProtoMessage

func (*Transaction) ProtoMessage()

func (*Transaction) ProtoReflect

func (x *Transaction) ProtoReflect() protoreflect.Message

func (*Transaction) Reset

func (x *Transaction) Reset()

func (*Transaction) String

func (x *Transaction) String() string

type TransactionMode

type TransactionMode int32

Transaction type

const (
	// Legacy transaction, pre-EIP2718/EIP1559; for fee gasPrice/gasLimit is used
	TransactionMode_Legacy TransactionMode = 0
	// Enveloped transaction EIP2718 (with type 0x2), fee is according to EIP1559 (base fee, inclusion fee, ...)
	TransactionMode_Enveloped TransactionMode = 1
	// EIP4337-compatible UserOperation
	TransactionMode_UserOp TransactionMode = 2
	// EIP-7702 transaction (with type 0x4); allows to set the code of a contract for an EOA.
	// Note that `SetCode` transaction extends `Enveloped` transaction.
	// https://eips.ethereum.org/EIPS/eip-7702
	TransactionMode_SetCode TransactionMode = 4
)

func (TransactionMode) Descriptor

func (TransactionMode) Enum

func (x TransactionMode) Enum() *TransactionMode

func (TransactionMode) EnumDescriptor deprecated

func (TransactionMode) EnumDescriptor() ([]byte, []int)

Deprecated: Use TransactionMode.Descriptor instead.

func (TransactionMode) Number

func (TransactionMode) String

func (x TransactionMode) String() string

func (TransactionMode) Type

type Transaction_ContractGeneric

type Transaction_ContractGeneric struct {

	// Amount to send in wei (uint256, serialized big endian)
	Amount []byte `protobuf:"bytes,1,opt,name=amount,proto3" json:"amount,omitempty"`
	// Contract call payload data
	Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
	// contains filtered or unexported fields
}

Generic smart contract transaction

func (*Transaction_ContractGeneric) Descriptor deprecated

func (*Transaction_ContractGeneric) Descriptor() ([]byte, []int)

Deprecated: Use Transaction_ContractGeneric.ProtoReflect.Descriptor instead.

func (*Transaction_ContractGeneric) GetAmount

func (x *Transaction_ContractGeneric) GetAmount() []byte

func (*Transaction_ContractGeneric) GetData

func (x *Transaction_ContractGeneric) GetData() []byte

func (*Transaction_ContractGeneric) ProtoMessage

func (*Transaction_ContractGeneric) ProtoMessage()

func (*Transaction_ContractGeneric) ProtoReflect

func (*Transaction_ContractGeneric) Reset

func (x *Transaction_ContractGeneric) Reset()

func (*Transaction_ContractGeneric) String

func (x *Transaction_ContractGeneric) String() string

type Transaction_ContractGeneric_

type Transaction_ContractGeneric_ struct {
	ContractGeneric *Transaction_ContractGeneric `protobuf:"bytes,6,opt,name=contract_generic,json=contractGeneric,proto3,oneof"`
}

type Transaction_ERC1155Transfer

type Transaction_ERC1155Transfer struct {

	// Source address
	From string `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"`
	// Destination address
	To string `protobuf:"bytes,2,opt,name=to,proto3" json:"to,omitempty"`
	// ID of the token (uint256, serialized big endian)
	TokenId []byte `protobuf:"bytes,3,opt,name=token_id,json=tokenId,proto3" json:"token_id,omitempty"`
	// The amount of tokens being transferred (uint256, serialized big endian)
	Value []byte `protobuf:"bytes,4,opt,name=value,proto3" json:"value,omitempty"`
	Data  []byte `protobuf:"bytes,5,opt,name=data,proto3" json:"data,omitempty"`
	// contains filtered or unexported fields
}

ERC1155 NFT transfer transaction

func (*Transaction_ERC1155Transfer) Descriptor deprecated

func (*Transaction_ERC1155Transfer) Descriptor() ([]byte, []int)

Deprecated: Use Transaction_ERC1155Transfer.ProtoReflect.Descriptor instead.

func (*Transaction_ERC1155Transfer) GetData

func (x *Transaction_ERC1155Transfer) GetData() []byte

func (*Transaction_ERC1155Transfer) GetFrom

func (x *Transaction_ERC1155Transfer) GetFrom() string

func (*Transaction_ERC1155Transfer) GetTo

func (*Transaction_ERC1155Transfer) GetTokenId

func (x *Transaction_ERC1155Transfer) GetTokenId() []byte

func (*Transaction_ERC1155Transfer) GetValue

func (x *Transaction_ERC1155Transfer) GetValue() []byte

func (*Transaction_ERC1155Transfer) ProtoMessage

func (*Transaction_ERC1155Transfer) ProtoMessage()

func (*Transaction_ERC1155Transfer) ProtoReflect

func (*Transaction_ERC1155Transfer) Reset

func (x *Transaction_ERC1155Transfer) Reset()

func (*Transaction_ERC1155Transfer) String

func (x *Transaction_ERC1155Transfer) String() string

type Transaction_ERC20Approve

type Transaction_ERC20Approve struct {

	// Target of the approval
	Spender string `protobuf:"bytes,1,opt,name=spender,proto3" json:"spender,omitempty"`
	// Amount to send (uint256, serialized big endian)
	Amount []byte `protobuf:"bytes,2,opt,name=amount,proto3" json:"amount,omitempty"`
	// contains filtered or unexported fields
}

ERC20 approve transaction

func (*Transaction_ERC20Approve) Descriptor deprecated

func (*Transaction_ERC20Approve) Descriptor() ([]byte, []int)

Deprecated: Use Transaction_ERC20Approve.ProtoReflect.Descriptor instead.

func (*Transaction_ERC20Approve) GetAmount

func (x *Transaction_ERC20Approve) GetAmount() []byte

func (*Transaction_ERC20Approve) GetSpender

func (x *Transaction_ERC20Approve) GetSpender() string

func (*Transaction_ERC20Approve) ProtoMessage

func (*Transaction_ERC20Approve) ProtoMessage()

func (*Transaction_ERC20Approve) ProtoReflect

func (x *Transaction_ERC20Approve) ProtoReflect() protoreflect.Message

func (*Transaction_ERC20Approve) Reset

func (x *Transaction_ERC20Approve) Reset()

func (*Transaction_ERC20Approve) String

func (x *Transaction_ERC20Approve) String() string

type Transaction_ERC20Transfer

type Transaction_ERC20Transfer struct {

	// destination address (string)
	To string `protobuf:"bytes,1,opt,name=to,proto3" json:"to,omitempty"`
	// Amount to send (uint256, serialized big endian)
	Amount []byte `protobuf:"bytes,2,opt,name=amount,proto3" json:"amount,omitempty"`
	// contains filtered or unexported fields
}

ERC20 token transfer transaction

func (*Transaction_ERC20Transfer) Descriptor deprecated

func (*Transaction_ERC20Transfer) Descriptor() ([]byte, []int)

Deprecated: Use Transaction_ERC20Transfer.ProtoReflect.Descriptor instead.

func (*Transaction_ERC20Transfer) GetAmount

func (x *Transaction_ERC20Transfer) GetAmount() []byte

func (*Transaction_ERC20Transfer) GetTo

func (x *Transaction_ERC20Transfer) GetTo() string

func (*Transaction_ERC20Transfer) ProtoMessage

func (*Transaction_ERC20Transfer) ProtoMessage()

func (*Transaction_ERC20Transfer) ProtoReflect

func (*Transaction_ERC20Transfer) Reset

func (x *Transaction_ERC20Transfer) Reset()

func (*Transaction_ERC20Transfer) String

func (x *Transaction_ERC20Transfer) String() string

type Transaction_ERC721Transfer

type Transaction_ERC721Transfer struct {

	// Source address
	From string `protobuf:"bytes,1,opt,name=from,proto3" json:"from,omitempty"`
	// Destination address
	To string `protobuf:"bytes,2,opt,name=to,proto3" json:"to,omitempty"`
	// ID of the token (uint256, serialized big endian)
	TokenId []byte `protobuf:"bytes,3,opt,name=token_id,json=tokenId,proto3" json:"token_id,omitempty"`
	// contains filtered or unexported fields
}

ERC721 NFT transfer transaction

func (*Transaction_ERC721Transfer) Descriptor deprecated

func (*Transaction_ERC721Transfer) Descriptor() ([]byte, []int)

Deprecated: Use Transaction_ERC721Transfer.ProtoReflect.Descriptor instead.

func (*Transaction_ERC721Transfer) GetFrom

func (x *Transaction_ERC721Transfer) GetFrom() string

func (*Transaction_ERC721Transfer) GetTo

func (*Transaction_ERC721Transfer) GetTokenId

func (x *Transaction_ERC721Transfer) GetTokenId() []byte

func (*Transaction_ERC721Transfer) ProtoMessage

func (*Transaction_ERC721Transfer) ProtoMessage()

func (*Transaction_ERC721Transfer) ProtoReflect

func (*Transaction_ERC721Transfer) Reset

func (x *Transaction_ERC721Transfer) Reset()

func (*Transaction_ERC721Transfer) String

func (x *Transaction_ERC721Transfer) String() string

type Transaction_Erc1155Transfer

type Transaction_Erc1155Transfer struct {
	Erc1155Transfer *Transaction_ERC1155Transfer `protobuf:"bytes,5,opt,name=erc1155_transfer,json=erc1155Transfer,proto3,oneof"`
}

type Transaction_Erc20Approve

type Transaction_Erc20Approve struct {
	Erc20Approve *Transaction_ERC20Approve `protobuf:"bytes,3,opt,name=erc20_approve,json=erc20Approve,proto3,oneof"`
}

type Transaction_Erc20Transfer

type Transaction_Erc20Transfer struct {
	Erc20Transfer *Transaction_ERC20Transfer `protobuf:"bytes,2,opt,name=erc20_transfer,json=erc20Transfer,proto3,oneof"`
}

type Transaction_Erc721Transfer

type Transaction_Erc721Transfer struct {
	Erc721Transfer *Transaction_ERC721Transfer `protobuf:"bytes,4,opt,name=erc721_transfer,json=erc721Transfer,proto3,oneof"`
}

type Transaction_SCWalletBatch

type Transaction_SCWalletBatch struct {

	// Batched calls to be executed on the smart contract wallet.
	Calls []*Transaction_SCWalletBatch_BatchedCall `protobuf:"bytes,1,rep,name=calls,proto3" json:"calls,omitempty"`
	// Smart contract wallet type.
	WalletType SCWalletType `` /* 128-byte string literal not displayed */
	// contains filtered or unexported fields
}

Batch transaction to a Smart Contract Wallet (ERC-4337 and ERC-7702).

func (*Transaction_SCWalletBatch) Descriptor deprecated

func (*Transaction_SCWalletBatch) Descriptor() ([]byte, []int)

Deprecated: Use Transaction_SCWalletBatch.ProtoReflect.Descriptor instead.

func (*Transaction_SCWalletBatch) GetCalls

func (*Transaction_SCWalletBatch) GetWalletType

func (x *Transaction_SCWalletBatch) GetWalletType() SCWalletType

func (*Transaction_SCWalletBatch) ProtoMessage

func (*Transaction_SCWalletBatch) ProtoMessage()

func (*Transaction_SCWalletBatch) ProtoReflect

func (*Transaction_SCWalletBatch) Reset

func (x *Transaction_SCWalletBatch) Reset()

func (*Transaction_SCWalletBatch) String

func (x *Transaction_SCWalletBatch) String() string

type Transaction_SCWalletBatch_BatchedCall

type Transaction_SCWalletBatch_BatchedCall struct {

	// Recipient addresses.
	Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
	// Amounts to send in wei (uint256, serialized big endian)
	Amount []byte `protobuf:"bytes,2,opt,name=amount,proto3" json:"amount,omitempty"`
	// Contract call payloads data
	Payload []byte `protobuf:"bytes,3,opt,name=payload,proto3" json:"payload,omitempty"`
	// contains filtered or unexported fields
}

func (*Transaction_SCWalletBatch_BatchedCall) Descriptor deprecated

func (*Transaction_SCWalletBatch_BatchedCall) Descriptor() ([]byte, []int)

Deprecated: Use Transaction_SCWalletBatch_BatchedCall.ProtoReflect.Descriptor instead.

func (*Transaction_SCWalletBatch_BatchedCall) GetAddress

func (*Transaction_SCWalletBatch_BatchedCall) GetAmount

func (*Transaction_SCWalletBatch_BatchedCall) GetPayload

func (x *Transaction_SCWalletBatch_BatchedCall) GetPayload() []byte

func (*Transaction_SCWalletBatch_BatchedCall) ProtoMessage

func (*Transaction_SCWalletBatch_BatchedCall) ProtoMessage()

func (*Transaction_SCWalletBatch_BatchedCall) ProtoReflect

func (*Transaction_SCWalletBatch_BatchedCall) Reset

func (*Transaction_SCWalletBatch_BatchedCall) String

type Transaction_SCWalletExecute

type Transaction_SCWalletExecute struct {

	// Transaction to be executed on the smart contract wallet.
	// TODO currently, smart contract wallet address is specified in `SigningInput.toAddress`, but it will be refactored soon.
	Transaction *Transaction `protobuf:"bytes,1,opt,name=transaction,proto3" json:"transaction,omitempty"`
	// Smart contract wallet type.
	WalletType SCWalletType `` /* 128-byte string literal not displayed */
	// contains filtered or unexported fields
}

Execute transaction to a Smart Contract Wallet (ERC-4337 and ERC-7702).

func (*Transaction_SCWalletExecute) Descriptor deprecated

func (*Transaction_SCWalletExecute) Descriptor() ([]byte, []int)

Deprecated: Use Transaction_SCWalletExecute.ProtoReflect.Descriptor instead.

func (*Transaction_SCWalletExecute) GetTransaction

func (x *Transaction_SCWalletExecute) GetTransaction() *Transaction

func (*Transaction_SCWalletExecute) GetWalletType

func (x *Transaction_SCWalletExecute) GetWalletType() SCWalletType

func (*Transaction_SCWalletExecute) ProtoMessage

func (*Transaction_SCWalletExecute) ProtoMessage()

func (*Transaction_SCWalletExecute) ProtoReflect

func (*Transaction_SCWalletExecute) Reset

func (x *Transaction_SCWalletExecute) Reset()

func (*Transaction_SCWalletExecute) String

func (x *Transaction_SCWalletExecute) String() string

type Transaction_ScwBatch

type Transaction_ScwBatch struct {
	// Batch transaction to a Smart Contract Wallet (ERC-4337 and ERC-7702).
	ScwBatch *Transaction_SCWalletBatch `protobuf:"bytes,7,opt,name=scw_batch,json=scwBatch,proto3,oneof"`
}

type Transaction_ScwExecute

type Transaction_ScwExecute struct {
	// Execute transaction to a Smart Contract Wallet (ERC-4337 and ERC-7702).
	ScwExecute *Transaction_SCWalletExecute `protobuf:"bytes,8,opt,name=scw_execute,json=scwExecute,proto3,oneof"`
}

type Transaction_Transfer

type Transaction_Transfer struct {

	// Amount to send in wei (uint256, serialized big endian)
	Amount []byte `protobuf:"bytes,1,opt,name=amount,proto3" json:"amount,omitempty"`
	// Optional payload data
	Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
	// contains filtered or unexported fields
}

Native coin transfer transaction

func (*Transaction_Transfer) Descriptor deprecated

func (*Transaction_Transfer) Descriptor() ([]byte, []int)

Deprecated: Use Transaction_Transfer.ProtoReflect.Descriptor instead.

func (*Transaction_Transfer) GetAmount

func (x *Transaction_Transfer) GetAmount() []byte

func (*Transaction_Transfer) GetData

func (x *Transaction_Transfer) GetData() []byte

func (*Transaction_Transfer) ProtoMessage

func (*Transaction_Transfer) ProtoMessage()

func (*Transaction_Transfer) ProtoReflect

func (x *Transaction_Transfer) ProtoReflect() protoreflect.Message

func (*Transaction_Transfer) Reset

func (x *Transaction_Transfer) Reset()

func (*Transaction_Transfer) String

func (x *Transaction_Transfer) String() string

type Transaction_Transfer_

type Transaction_Transfer_ struct {
	Transfer *Transaction_Transfer `protobuf:"bytes,1,opt,name=transfer,proto3,oneof"`
}

type UserOperation

type UserOperation struct {

	// Entry point contract address
	EntryPoint string `protobuf:"bytes,1,opt,name=entry_point,json=entryPoint,proto3" json:"entry_point,omitempty"`
	// Account factory contract address
	InitCode []byte `protobuf:"bytes,2,opt,name=init_code,json=initCode,proto3" json:"init_code,omitempty"`
	// Account logic contract address
	Sender string `protobuf:"bytes,3,opt,name=sender,proto3" json:"sender,omitempty"`
	// The amount of gas to pay for to compensate the bundler for pre-verification execution and calldata
	PreVerificationGas []byte `protobuf:"bytes,4,opt,name=pre_verification_gas,json=preVerificationGas,proto3" json:"pre_verification_gas,omitempty"`
	// The amount of gas to allocate for the verification step
	VerificationGasLimit []byte `protobuf:"bytes,5,opt,name=verification_gas_limit,json=verificationGasLimit,proto3" json:"verification_gas_limit,omitempty"`
	// Address of paymaster sponsoring the transaction, followed by extra data to send to the paymaster (empty for self-sponsored transaction)
	PaymasterAndData []byte `protobuf:"bytes,6,opt,name=paymaster_and_data,json=paymasterAndData,proto3" json:"paymaster_and_data,omitempty"`
	// contains filtered or unexported fields
}

ERC-4337 structure that describes a transaction to be sent on behalf of a user

func (*UserOperation) Descriptor deprecated

func (*UserOperation) Descriptor() ([]byte, []int)

Deprecated: Use UserOperation.ProtoReflect.Descriptor instead.

func (*UserOperation) GetEntryPoint

func (x *UserOperation) GetEntryPoint() string

func (*UserOperation) GetInitCode

func (x *UserOperation) GetInitCode() []byte

func (*UserOperation) GetPaymasterAndData

func (x *UserOperation) GetPaymasterAndData() []byte

func (*UserOperation) GetPreVerificationGas

func (x *UserOperation) GetPreVerificationGas() []byte

func (*UserOperation) GetSender

func (x *UserOperation) GetSender() string

func (*UserOperation) GetVerificationGasLimit

func (x *UserOperation) GetVerificationGasLimit() []byte

func (*UserOperation) ProtoMessage

func (*UserOperation) ProtoMessage()

func (*UserOperation) ProtoReflect

func (x *UserOperation) ProtoReflect() protoreflect.Message

func (*UserOperation) Reset

func (x *UserOperation) Reset()

func (*UserOperation) String

func (x *UserOperation) String() string

type UserOperationV0_7

type UserOperationV0_7 struct {

	// Entry point contract address
	EntryPoint string `protobuf:"bytes,1,opt,name=entry_point,json=entryPoint,proto3" json:"entry_point,omitempty"`
	// Account factory contract address
	Factory string `protobuf:"bytes,2,opt,name=factory,proto3" json:"factory,omitempty"`
	// Account factory data
	FactoryData []byte `protobuf:"bytes,3,opt,name=factory_data,json=factoryData,proto3" json:"factory_data,omitempty"`
	// Account logic contract address
	Sender string `protobuf:"bytes,4,opt,name=sender,proto3" json:"sender,omitempty"`
	// The amount of gas to pay for to compensate the bundler for pre-verification execution and calldata
	PreVerificationGas []byte `protobuf:"bytes,5,opt,name=pre_verification_gas,json=preVerificationGas,proto3" json:"pre_verification_gas,omitempty"`
	// The amount of gas to allocate for the verification step
	VerificationGasLimit []byte `protobuf:"bytes,6,opt,name=verification_gas_limit,json=verificationGasLimit,proto3" json:"verification_gas_limit,omitempty"`
	// Address of paymaster
	Paymaster string `protobuf:"bytes,7,opt,name=paymaster,proto3" json:"paymaster,omitempty"`
	// The amount of gas to allocate for the paymaster verification step
	PaymasterVerificationGasLimit []byte `` /* 152-byte string literal not displayed */
	// The amount of gas to allocate for paymaster post ops
	PaymasterPostOpGasLimit []byte `` /* 136-byte string literal not displayed */
	// Paymaster data
	PaymasterData []byte `protobuf:"bytes,10,opt,name=paymaster_data,json=paymasterData,proto3" json:"paymaster_data,omitempty"`
	// contains filtered or unexported fields
}

EIP-7702 compatible ERC-4337 structure that describes a transaction to be sent on behalf of a user

func (*UserOperationV0_7) Descriptor deprecated

func (*UserOperationV0_7) Descriptor() ([]byte, []int)

Deprecated: Use UserOperationV0_7.ProtoReflect.Descriptor instead.

func (*UserOperationV0_7) GetEntryPoint

func (x *UserOperationV0_7) GetEntryPoint() string

func (*UserOperationV0_7) GetFactory

func (x *UserOperationV0_7) GetFactory() string

func (*UserOperationV0_7) GetFactoryData

func (x *UserOperationV0_7) GetFactoryData() []byte

func (*UserOperationV0_7) GetPaymaster

func (x *UserOperationV0_7) GetPaymaster() string

func (*UserOperationV0_7) GetPaymasterData

func (x *UserOperationV0_7) GetPaymasterData() []byte

func (*UserOperationV0_7) GetPaymasterPostOpGasLimit

func (x *UserOperationV0_7) GetPaymasterPostOpGasLimit() []byte

func (*UserOperationV0_7) GetPaymasterVerificationGasLimit

func (x *UserOperationV0_7) GetPaymasterVerificationGasLimit() []byte

func (*UserOperationV0_7) GetPreVerificationGas

func (x *UserOperationV0_7) GetPreVerificationGas() []byte

func (*UserOperationV0_7) GetSender

func (x *UserOperationV0_7) GetSender() string

func (*UserOperationV0_7) GetVerificationGasLimit

func (x *UserOperationV0_7) GetVerificationGasLimit() []byte

func (*UserOperationV0_7) ProtoMessage

func (*UserOperationV0_7) ProtoMessage()

func (*UserOperationV0_7) ProtoReflect

func (x *UserOperationV0_7) ProtoReflect() protoreflect.Message

func (*UserOperationV0_7) Reset

func (x *UserOperationV0_7) Reset()

func (*UserOperationV0_7) String

func (x *UserOperationV0_7) String() string

Jump to

Keyboard shortcuts

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