Documentation ¶
Index ¶
- type Backend
- func (b *Backend) AccountBalance(ctx context.Context, req *types.AccountBalanceRequest) (*types.AccountBalanceResponse, *types.Error)
- func (b *Backend) AccountCoins(ctx context.Context, req *types.AccountCoinsRequest) (*types.AccountCoinsResponse, *types.Error)
- func (*Backend) CombineTx(tx common.AvaxTx, signatures []*types.Signature) (common.AvaxTx, *types.Error)
- func (b *Backend) ConstructionCombine(_ context.Context, req *types.ConstructionCombineRequest) (*types.ConstructionCombineResponse, *types.Error)
- func (*Backend) ConstructionDerive(_ context.Context, req *types.ConstructionDeriveRequest) (*types.ConstructionDeriveResponse, *types.Error)
- func (b *Backend) ConstructionHash(_ context.Context, req *types.ConstructionHashRequest) (*types.TransactionIdentifierResponse, *types.Error)
- func (b *Backend) ConstructionMetadata(ctx context.Context, req *types.ConstructionMetadataRequest) (*types.ConstructionMetadataResponse, *types.Error)
- func (b *Backend) ConstructionParse(_ context.Context, req *types.ConstructionParseRequest) (*types.ConstructionParseResponse, *types.Error)
- func (b *Backend) ConstructionPayloads(_ context.Context, req *types.ConstructionPayloadsRequest) (*types.ConstructionPayloadsResponse, *types.Error)
- func (b *Backend) ConstructionPreprocess(_ context.Context, req *types.ConstructionPreprocessRequest) (*types.ConstructionPreprocessResponse, *types.Error)
- func (b *Backend) ConstructionSubmit(ctx context.Context, req *types.ConstructionSubmitRequest) (*types.TransactionIdentifierResponse, *types.Error)
- func (b *Backend) ShouldHandleRequest(req interface{}) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Backend ¶
type Backend struct {
// contains filtered or unexported fields
}
func NewBackend ¶
NewBackend creates a C-chain atomic transaction service backend
func (*Backend) AccountBalance ¶
func (b *Backend) AccountBalance(ctx context.Context, req *types.AccountBalanceRequest) (*types.AccountBalanceResponse, *types.Error)
AccountBalance implements /account/balance endpoint for C-chain atomic transaction balance
This endpoint is called if the account is in Bech32 format for a C-chain request
func (*Backend) AccountCoins ¶
func (b *Backend) AccountCoins(ctx context.Context, req *types.AccountCoinsRequest) (*types.AccountCoinsResponse, *types.Error)
AccountCoins implements /account/coins endpoint for C-chain atomic transaction UTXOs
This endpoint is called if the account is in Bech32 format for a C-chain request
func (*Backend) CombineTx ¶
func (*Backend) CombineTx(tx common.AvaxTx, signatures []*types.Signature) (common.AvaxTx, *types.Error)
CombineTx implements C-chain atomic transaction specific logic for combining unsigned transactions and signatures
func (*Backend) ConstructionCombine ¶
func (b *Backend) ConstructionCombine(_ context.Context, req *types.ConstructionCombineRequest) (*types.ConstructionCombineResponse, *types.Error)
ConstructionCombine implements /construction/combine endpoint for C-chain atomic transactions
func (*Backend) ConstructionDerive ¶
func (*Backend) ConstructionDerive(_ context.Context, req *types.ConstructionDeriveRequest) (*types.ConstructionDeriveResponse, *types.Error)
ConstructionDerive implements /construction/derive endpoint for C-chain atomic transactions
func (*Backend) ConstructionHash ¶
func (b *Backend) ConstructionHash( _ context.Context, req *types.ConstructionHashRequest, ) (*types.TransactionIdentifierResponse, *types.Error)
ConstructionHash implements /construction/hash endpoint for C-chain atomic transactions
func (*Backend) ConstructionMetadata ¶
func (b *Backend) ConstructionMetadata( ctx context.Context, req *types.ConstructionMetadataRequest, ) (*types.ConstructionMetadataResponse, *types.Error)
ConstructionMetadata implements /construction/metadata endpoint for C-chain atomic transactions
func (*Backend) ConstructionParse ¶
func (b *Backend) ConstructionParse(_ context.Context, req *types.ConstructionParseRequest) (*types.ConstructionParseResponse, *types.Error)
ConstructionParse implements /construction/parse endpoint for C-chain atomic transactions
func (*Backend) ConstructionPayloads ¶
func (b *Backend) ConstructionPayloads(_ context.Context, req *types.ConstructionPayloadsRequest) (*types.ConstructionPayloadsResponse, *types.Error)
ConstructionPayloads implements /construction/payloads endpoint for C-chain atomic transactions
func (*Backend) ConstructionPreprocess ¶
func (b *Backend) ConstructionPreprocess( _ context.Context, req *types.ConstructionPreprocessRequest, ) (*types.ConstructionPreprocessResponse, *types.Error)
ConstructionPreprocess implements /construction/preprocess endpoint for C-chain atomic transactions
func (*Backend) ConstructionSubmit ¶
func (b *Backend) ConstructionSubmit( ctx context.Context, req *types.ConstructionSubmitRequest, ) (*types.TransactionIdentifierResponse, *types.Error)
ConstructionSubmit implements /construction/submit endpoint for C-chain atomic transactions
func (*Backend) ShouldHandleRequest ¶
ShouldHandleRequest returns whether a given request should be handled by this backend