transactions

package
v0.0.0-...-989067b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 15, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

type Controller struct {
	// contains filtered or unexported fields
}

func NewController

func NewController(serv *Service, logger *zap.Logger) *Controller

func (*Controller) GetTransactionNumberBySender

func (c *Controller) GetTransactionNumberBySender(ctx *fiber.Ctx) error

func (*Controller) GetTransactionsBySender

func (c *Controller) GetTransactionsBySender(ctx *fiber.Ctx) error

type Repository

type Repository struct {
	// contains filtered or unexported fields
}

func NewRepository

func NewRepository(db *mongo.Database, logger *zap.Logger) *Repository

func (*Repository) GetTransactionNumberBySender

func (r *Repository) GetTransactionNumberBySender(ctx context.Context, sender *sender) (*int64, error)

func (*Repository) GetTransactionsBySender

func (r *Repository) GetTransactionsBySender(ctx context.Context, sender *sender, p *pagination.Pagination) ([]*TransactionDocWithVAA, error)

func (*Repository) GetVAAById

func (r *Repository) GetVAAById(ctx context.Context, id string) ([]byte, error)

type Service

type Service struct {
	// contains filtered or unexported fields
}

func NewService

func NewService(r *Repository, logger *zap.Logger) *Service

func (*Service) GetTransactionNumberBySender

func (s *Service) GetTransactionNumberBySender(ctx context.Context, sender *sender) (*int64, error)

func (*Service) GetTransactionsBySender

func (s *Service) GetTransactionsBySender(ctx context.Context, sender *sender, p *pagination.Pagination) ([]*TransactionDocWithVAA, error)

type TransactionDoc

type TransactionDoc struct {
	ID           string      `bson:"_id" json:"id"`
	TxId         string      `bson:"txId" json:"txId"`
	Address      string      `bson:"address" json:"address"`
	BlockHash    string      `bson:"blockHash" json:"blockHash"`
	BlockNumber  uint32      `bson:"blockNumber" json:"blockNumber"`
	Sequence     uint64      `bson:"sequence" json:"sequence"`
	EmitterChain vaa.ChainID `bson:"emitterChain" json:"emitterChain"`
	TargetChain  vaa.ChainID `bson:"targetChain" json:"targetChain"`
}

type TransactionDocWithVAA

type TransactionDocWithVAA struct {
	TransactionDoc
	Vaa string `json:"vaa"`
}

Jump to

Keyboard shortcuts

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