Documentation ¶
Index ¶
- Constants
- type APIService
- func (a *APIService) ConstructionCombine(ctx context.Context, request *types.ConstructionCombineRequest) (*types.ConstructionCombineResponse, *types.Error)
- func (a *APIService) ConstructionDerive(ctx context.Context, request *types.ConstructionDeriveRequest) (*types.ConstructionDeriveResponse, *types.Error)
- func (a *APIService) ConstructionHash(ctx context.Context, request *types.ConstructionHashRequest) (*types.TransactionIdentifierResponse, *types.Error)
- func (a *APIService) ConstructionMetadata(ctx context.Context, request *types.ConstructionMetadataRequest) (*types.ConstructionMetadataResponse, *types.Error)
- func (a *APIService) ConstructionParse(ctx context.Context, request *types.ConstructionParseRequest) (*types.ConstructionParseResponse, *types.Error)
- func (a *APIService) ConstructionPayloads(ctx context.Context, request *types.ConstructionPayloadsRequest) (*types.ConstructionPayloadsResponse, *types.Error)
- func (a *APIService) ConstructionPreprocess(ctx context.Context, request *types.ConstructionPreprocessRequest) (*types.ConstructionPreprocessResponse, *types.Error)
- func (a *APIService) ConstructionSubmit(ctx context.Context, request *types.ConstructionSubmitRequest) (*types.TransactionIdentifierResponse, *types.Error)
- type Client
Constants ¶
const ( // TokenContractAddressKey is the key in the currency metadata map // that represents the contract address of a token TokenContractAddressKey = "token_address" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIService ¶
type APIService struct {
// contains filtered or unexported fields
}
APIService implements the server.ConstructionAPIServicer interface.
func NewAPIService ¶
func NewAPIService( cfg *configuration.Configuration, client Client, ) *APIService
NewAPIService creates a new instance of a APIService.
func (*APIService) ConstructionCombine ¶
func (a *APIService) ConstructionCombine( ctx context.Context, request *types.ConstructionCombineRequest, ) (*types.ConstructionCombineResponse, *types.Error)
ConstructionCombine implements the /construction/combine endpoint.
func (*APIService) ConstructionDerive ¶
func (a *APIService) ConstructionDerive( ctx context.Context, request *types.ConstructionDeriveRequest, ) (*types.ConstructionDeriveResponse, *types.Error)
ConstructionDerive implements the /construction/derive endpoint.
func (*APIService) ConstructionHash ¶
func (a *APIService) ConstructionHash( ctx context.Context, request *types.ConstructionHashRequest, ) (*types.TransactionIdentifierResponse, *types.Error)
ConstructionHash implements the /construction/hash endpoint.
func (*APIService) ConstructionMetadata ¶
func (a *APIService) ConstructionMetadata( ctx context.Context, request *types.ConstructionMetadataRequest, ) (*types.ConstructionMetadataResponse, *types.Error)
ConstructionMetadata implements the /construction/metadata endpoint.
func (*APIService) ConstructionParse ¶
func (a *APIService) ConstructionParse( ctx context.Context, request *types.ConstructionParseRequest, ) (*types.ConstructionParseResponse, *types.Error)
ConstructionParse implements the /construction/parse endpoint.
func (*APIService) ConstructionPayloads ¶
func (a *APIService) ConstructionPayloads( ctx context.Context, request *types.ConstructionPayloadsRequest, ) (*types.ConstructionPayloadsResponse, *types.Error)
ConstructionPayloads implements the /construction/payloads endpoint.
func (*APIService) ConstructionPreprocess ¶
func (a *APIService) ConstructionPreprocess( ctx context.Context, request *types.ConstructionPreprocessRequest, ) (*types.ConstructionPreprocessResponse, *types.Error)
ConstructionPreprocess implements the /construction/preprocess endpoint.
func (*APIService) ConstructionSubmit ¶
func (a *APIService) ConstructionSubmit( ctx context.Context, request *types.ConstructionSubmitRequest, ) (*types.TransactionIdentifierResponse, *types.Error)
ConstructionSubmit implements the /construction/submit endpoint.
type Client ¶
type Client interface { Status(context.Context) ( *types.BlockIdentifier, int64, *types.SyncStatus, []*types.Peer, error, ) Block( context.Context, *types.PartialBlockIdentifier, ) (*types.Block, error) Balance( context.Context, *types.AccountIdentifier, *types.PartialBlockIdentifier, []*types.Currency, ) (*types.AccountBalanceResponse, error) PendingNonceAt(context.Context, common.Address) (uint64, error) EstimateGas(ctx context.Context, msg ethereum.CallMsg) (uint64, error) BlockHeader(ctx context.Context, number *big.Int) (*ethTypes.Header, error) SendTransaction(ctx context.Context, tx *ethTypes.Transaction) error SuggestGasTipCap(ctx context.Context) (*big.Int, error) Call( ctx context.Context, request *types.CallRequest, ) (*types.CallResponse, error) }
Client is used by the servicers to get block data and to submit transactions.