Documentation ¶
Index ¶
- Variables
- func NewRelayedTxV1Builder() *relayedTxV1Builder
- func NewRelayedTxV2Builder() *relayedTxV2Builder
- func NewTxBuilder(signer Signer) (*txBuilder, error)
- func NewTxDataBuilder() *txDataBuilder
- func NewVMQueryBuilder() *vmQueryBuilder
- func TransactionToUnsignedTx(tx *transaction.FrontendTransaction) *transaction.FrontendTransaction
- type Signer
- type TxDataBuilder
- type VMQueryBuilder
Constants ¶
This section is empty.
Variables ¶
var ErrGasLimitForInnerTransactionV2ShouldBeZero = errors.New("gas limit of the inner transaction should be 0")
ErrGasLimitForInnerTransactionV2ShouldBeZero signals that the gas limit for the inner transaction should be zero
var ErrGuardianDoesNotMatch = errors.New("configured guardian does not match signing guardian")
ErrGuardianDoesNotMatch signals a mismatch between the configured guardian in tx and the signing guardian address
var ErrInvalidAddress = errors.New("invalid address handler")
ErrInvalidAddress signals that an invalid address was provided
var ErrInvalidGasLimitNeededForInnerTransaction = errors.New("invalid gas limit needed for inner transaction")
ErrInvalidGasLimitNeededForInnerTransaction signals that an invalid gas limit needed for the inner transaction was provided
var ErrInvalidValue = errors.New("invalid value")
ErrInvalidValue signals that an invalid value was provided
var ErrMissingGuardianOption = errors.New("guardian flag is missing in the option field")
ErrMissingGuardianOption signals that the guardian flag is missing in the transaction option field
var ErrMissingSignature = errors.New("missing signature when computing the transaction's hash")
ErrMissingSignature signals that a transaction's signature is empty when trying to compute it's hash
var ErrNilAddress = errors.New("nil address handler")
ErrNilAddress signals that a nil address was provided
var ErrNilCryptoComponentsHolder = errors.New("nil crypto components holder")
ErrNilCryptoComponentsHolder signals that a nil crypto components holder was provided
var ErrNilInnerTransaction = errors.New("nil inner transaction")
ErrNilInnerTransaction signals that a nil inner transaction was provided
var ErrNilInnerTransactionSignature = errors.New("nil inner transaction signature")
ErrNilInnerTransactionSignature signals that a nil inner transaction signature was provided
var ErrNilNetworkConfig = errors.New("nil network config")
ErrNilNetworkConfig signals that a nil network config was provided
var ErrNilRelayerAccount = errors.New("nil relayer account")
ErrNilRelayerAccount signals that a nil relayer account was provided
var ErrNilSigner = errors.New("nil signer")
ErrNilSigner signals that a nil transaction signer was provided
var ErrNilValue = errors.New("nil value")
ErrNilValue signals that a nil value was provided
Functions ¶
func NewRelayedTxV1Builder ¶
func NewRelayedTxV1Builder() *relayedTxV1Builder
NewRelayedTxV1Builder creates a new relayed transaction v1 builder
func NewRelayedTxV2Builder ¶
func NewRelayedTxV2Builder() *relayedTxV2Builder
NewRelayedTxV2Builder creates a new relayed transaction v2 builder
func NewTxBuilder ¶
NewTxBuilder will create a new transaction builder able to build and correctly sign a transaction
func NewTxDataBuilder ¶
func NewTxDataBuilder() *txDataBuilder
NewTxDataBuilder creates a new transaction data builder
func NewVMQueryBuilder ¶
func NewVMQueryBuilder() *vmQueryBuilder
NewVMQueryBuilder creates a new vm query data builder
func TransactionToUnsignedTx ¶ added in v1.3.3
func TransactionToUnsignedTx(tx *transaction.FrontendTransaction) *transaction.FrontendTransaction
TransactionToUnsignedTx returns a shallow clone of the transaction, that has the signature fields set to nil
Types ¶
type Signer ¶
type Signer interface { SignMessage(msg []byte, privateKey crypto.PrivateKey) ([]byte, error) VerifyMessage(msg []byte, publicKey crypto.PublicKey, sig []byte) error SignTransaction(tx *transaction.FrontendTransaction, privateKey crypto.PrivateKey) ([]byte, error) SignByteSlice(msg []byte, privateKey crypto.PrivateKey) ([]byte, error) VerifyByteSlice(msg []byte, publicKey crypto.PublicKey, sig []byte) error IsInterfaceNil() bool }
Signer defines the method used by a struct used to create valid signatures
type TxDataBuilder ¶
type TxDataBuilder interface { Function(function string) TxDataBuilder ArgHexString(hexed string) TxDataBuilder ArgAddress(address core.AddressHandler) TxDataBuilder ArgBigInt(value *big.Int) TxDataBuilder ArgInt64(value int64) TxDataBuilder ArgBytes(bytes []byte) TxDataBuilder ArgBytesList(list [][]byte) TxDataBuilder ToDataString() (string, error) ToDataBytes() ([]byte, error) IsInterfaceNil() bool }
TxDataBuilder defines the behavior of a transaction data builder
type VMQueryBuilder ¶
type VMQueryBuilder interface { Function(function string) VMQueryBuilder CallerAddress(address core.AddressHandler) VMQueryBuilder Address(address core.AddressHandler) VMQueryBuilder ArgHexString(hexed string) VMQueryBuilder ArgAddress(address core.AddressHandler) VMQueryBuilder ArgBigInt(value *big.Int) VMQueryBuilder ArgInt64(value int64) VMQueryBuilder ArgBytes(bytes []byte) VMQueryBuilder ToVmValueRequest() (*data.VmValueRequest, error) IsInterfaceNil() bool }
VMQueryBuilder defines the behavior of a vm query builder