Documentation ¶
Index ¶
- Constants
- func GetEIP191EncodedData(msg []byte) []byte
- func GetEIP712EncodedData(typedData *core.TypedData) ([]byte, error)
- type BlockNumber
- type CallMsg
- func (msg *CallMsg) MarshalJSON() ([]byte, error)
- func (msg *CallMsg) UnmarshalJSON(b []byte) error
- func (msg *CallMsg) WithData(d []byte) *CallMsg
- func (msg *CallMsg) WithFrom(addr ethcommon.Address) *CallMsg
- func (msg *CallMsg) WithGas(gas uint64) *CallMsg
- func (msg *CallMsg) WithGasPrice(p *big.Int) *CallMsg
- func (msg *CallMsg) WithTo(addr ethcommon.Address) *CallMsg
- func (msg *CallMsg) WithValue(v *big.Int) *CallMsg
- type Caller
- type EEACaller
- type EthCaller
- type PrivCaller
- type PrivacyFlag
- type PrivateArgs
- func (args *PrivateArgs) WithPrivacyFlag(flag PrivacyFlag) *PrivateArgs
- func (args *PrivateArgs) WithPrivacyGroupID(id string) *PrivateArgs
- func (args *PrivateArgs) WithPrivateFor(pubKeys []string) *PrivateArgs
- func (args *PrivateArgs) WithPrivateFrom(pubKey string) *PrivateArgs
- func (args *PrivateArgs) WithPrivateType(pubKey string) *PrivateArgs
- type PrivateType
- type SendEEATxMsg
- type SendTxMsg
- func (msg *SendTxMsg) IsLegacy() bool
- func (msg *SendTxMsg) IsPrivate() bool
- func (msg *SendTxMsg) MarshalJSON() ([]byte, error)
- func (msg *SendTxMsg) TxData(txType int, chainID *big.Int) *types.Transaction
- func (msg *SendTxMsg) TxDataQuorum() *quorumtypes.Transaction
- func (msg *SendTxMsg) UnmarshalJSON(b []byte) error
Constants ¶
const ( PendingBlockNumber = BlockNumber(-2) LatestBlockNumber = BlockNumber(-1) EarliestBlockNumber = BlockNumber(0) )
const (
EIP712DomainLabel = "EIP712Domain"
)
Variables ¶
This section is empty.
Functions ¶
func GetEIP191EncodedData ¶
Types ¶
type BlockNumber ¶
type BlockNumber int64
func (BlockNumber) Int64 ¶
func (n BlockNumber) Int64() int64
func (BlockNumber) MarshalText ¶
func (n BlockNumber) MarshalText() ([]byte, error)
func (*BlockNumber) UnmarshalJSON ¶
func (n *BlockNumber) UnmarshalJSON(data []byte) error
UnmarshalJSON parses the given JSON fragment into a BlockNumber. It supports: - "latest", "earliest" or "pending" as string arguments - the block number Returned errors: - an invalid block number error when the given argument isn't a known strings - an out of range error when the given block number is either too little or too large
type CallMsg ¶
type CallMsg struct { From *ethcommon.Address // the sender of the 'transaction' To *ethcommon.Address // the destination contract (nil for contract creation) Gas *uint64 // if 0, the call executes with near-infinite gas GasPrice *big.Int // wei <-> gas exchange ratio Value *big.Int // amount of wei sent along with the call Data *[]byte // input data, usually an ABI-encoded contract method invocation GasFeeCap *big.Int GasTipCap *big.Int AccessList types.AccessList }
CallMsg contains parameters for contract calls.
func (*CallMsg) MarshalJSON ¶
func (*CallMsg) UnmarshalJSON ¶
type Caller ¶
type Caller interface { Eth() EthCaller EEA() EEACaller Priv() PrivCaller }
type EthCaller ¶
type EthCaller interface { ChainID(context.Context) (*big.Int, error) GasPrice(context.Context) (*big.Int, error) BaseFeePerGas(context.Context, BlockNumber) (*big.Int, error) GetTransactionCount(context.Context, ethcommon.Address, BlockNumber) (uint64, error) EstimateGas(context.Context, *CallMsg) (uint64, error) SendRawTransaction(context.Context, []byte) (ethcommon.Hash, error) SendRawPrivateTransaction(context.Context, []byte, *PrivateArgs) (ethcommon.Hash, error) }
EthCaller is a JSON-RPC client to an Ethereum client using eth namespace
type PrivCaller ¶
type PrivCaller interface { DistributeRawTransaction(context.Context, []byte) ([]byte, error) GetTransactionCount(ctx context.Context, addr ethcommon.Address, privacyGroupID string) (uint64, error) GetEeaTransactionCount(ctx context.Context, addr ethcommon.Address, privateFrom string, privateFor []string) (uint64, error) }
type PrivacyFlag ¶
type PrivacyFlag uint64
const ( StandardPrivatePrivacyFlag PrivacyFlag = iota // 0 PartyProtectionPrivacyFlag PrivacyFlag = 1 << PrivacyFlag(iota-1) // 1 StateValidationPrivacyFlag = iota | PartyProtectionPrivacyFlag // 3 which includes PrivacyFlagPartyProtection )
type PrivateArgs ¶
type PrivateArgs struct { PrivateFrom *string `json:"privateFrom,omitempty"` PrivateFor *[]string `json:"privateFor,omitempty"` PrivateType *PrivateType `json:"restriction,omitempty"` PrivacyFlag *PrivacyFlag `json:"privacyFlag,omitempty"` PrivacyGroupID *string `json:"privacyGroupId,omitempty"` }
TODO: Delete usage of unnecessary pointers: https://app.zenhub.com/workspaces/orchestrate-5ea70772b186e10067f57842/issues/consensys/quorum-key-manager/96 PrivateArgs arguments for private transactions
func (*PrivateArgs) WithPrivacyFlag ¶
func (args *PrivateArgs) WithPrivacyFlag(flag PrivacyFlag) *PrivateArgs
func (*PrivateArgs) WithPrivacyGroupID ¶
func (args *PrivateArgs) WithPrivacyGroupID(id string) *PrivateArgs
func (*PrivateArgs) WithPrivateFor ¶
func (args *PrivateArgs) WithPrivateFor(pubKeys []string) *PrivateArgs
func (*PrivateArgs) WithPrivateFrom ¶
func (args *PrivateArgs) WithPrivateFrom(pubKey string) *PrivateArgs
func (*PrivateArgs) WithPrivateType ¶
func (args *PrivateArgs) WithPrivateType(pubKey string) *PrivateArgs
type PrivateType ¶
type PrivateType string
const ( PrivateTypeRestricted PrivateType = "restricted" PrivateTypeUnrestricted PrivateType = "unrestricted" )
type SendEEATxMsg ¶
type SendEEATxMsg struct { From ethcommon.Address To *ethcommon.Address Nonce *uint64 Data *[]byte Gas *uint64 GasPrice *big.Int PrivateArgs }
TODO: Delete usage of unnecessary pointers: https://app.zenhub.com/workspaces/orchestrate-5ea70772b186e10067f57842/issues/consensys/quorum-key-manager/96
func (*SendEEATxMsg) MarshalJSON ¶
func (msg *SendEEATxMsg) MarshalJSON() ([]byte, error)
func (*SendEEATxMsg) TxData ¶
func (msg *SendEEATxMsg) TxData() *types.Transaction
func (*SendEEATxMsg) UnmarshalJSON ¶
func (msg *SendEEATxMsg) UnmarshalJSON(b []byte) error
type SendTxMsg ¶
type SendTxMsg struct { From ethcommon.Address To *ethcommon.Address Gas *uint64 GasPrice *big.Int Value *big.Int Nonce *uint64 Data *[]byte GasFeeCap *big.Int GasTipCap *big.Int AccessList types.AccessList PrivateArgs }
TODO: Delete usage of unnecessary pointers: https://app.zenhub.com/workspaces/orchestrate-5ea70772b186e10067f57842/issues/consensys/quorum-key-manager/96
func (*SendTxMsg) MarshalJSON ¶
func (*SendTxMsg) TxDataQuorum ¶
func (msg *SendTxMsg) TxDataQuorum() *quorumtypes.Transaction
TODO: Delete this function and use only go-quorum types when