transfers

package
v0.9.8 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2025 License: MIT Imports: 45 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateTransferRequest

type CreateTransferRequest struct {
	OwnerID         uuid.UUID                 `json:"owner_id"`
	RequestID       string                    `json:"request_id"`
	Blockchain      wconstants.BlockchainType `json:"blockchain"`
	FromAddresses   []string                  `json:"from_addresses"`
	ToAddresses     []string                  `json:"to_addresses"`
	AssetIdentifier string                    `json:"asset_identifier"`
	Kind            *string                   `json:"kind"`
	WholeAmount     bool                      `json:"whole_amount"`
	Amount          decimal.NullDecimal       `json:"amount"`
	Fee             decimal.NullDecimal       `json:"fee"`
	FeeMax          decimal.NullDecimal       `json:"fee_max"`
	// contains filtered or unexported fields
}

type FindParams

type FindParams = repo_transfers.FindParams

type Service

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

func New

func New(
	l logger.Logger,
	conf *config.Config,
	st store.IStore,
	walletsSvc *wallets.Service,
	eproxySvc *eproxy.Service,
	blockchains *blockchains.Blockchains,
	rmanager *rmanager.Service,
) *Service

func (*Service) Create

Create transfer

func (*Service) ExistsByTxHashAndOwnerID

func (s *Service) ExistsByTxHashAndOwnerID(ctx context.Context, txHash string, ownerID uuid.UUID) (bool, error)

ExistsByTxHashAndOwnerID checks if the transfer with the specified txHash and ownerID exists.

func (*Service) Find

func (s *Service) Find(ctx context.Context, params FindParams) ([]*models.Transfer, error)

Find

func (*Service) FindAllNewTransfers

func (s *Service) FindAllNewTransfers(ctx context.Context) ([]*models.Transfer, error)

FindAllNewTransfers returns all new transfers.

func (*Service) GetActiveTronTransfersBurn

func (s *Service) GetActiveTronTransfersBurn(ctx context.Context) (*repo_transfers.GetActiveTronTransfersBurnRow, error)

GetActiveTronTransfersBurn

func (*Service) GetActiveTronTransfersResources

func (s *Service) GetActiveTronTransfersResources(ctx context.Context) (*repo_transfers.GetActiveTronTransfersResourcesRow, error)

GetActiveTronTransfersResources

func (*Service) GetByID

func (s *Service) GetByID(ctx context.Context, transferID uuid.UUID) (*models.Transfer, error)

GetByID returns the transfer by the ID.

func (*Service) GetByRequestID

func (s *Service) GetByRequestID(ctx context.Context, requestID string) (*models.Transfer, error)

func (*Service) GetByTxHashAndOwnerID

func (s *Service) GetByTxHashAndOwnerID(ctx context.Context, txHash string, ownerID uuid.UUID) (*models.Transfer, error)

GetByTxHashAndOwnerID returns the transfer by the txHash and ownerID.

func (*Service) GetStateData

func (s *Service) GetStateData(ctx context.Context, transferID uuid.UUID) (map[string]any, error)

GetStateData returns the state data for the transfer.

func (*Service) GetSystemTransactionsByTransfer

func (s *Service) GetSystemTransactionsByTransfer(ctx context.Context, transferID uuid.UUID) ([]*models.TransferTransaction, error)

func (*Service) GetWorkflowSnapshot

func (s *Service) GetWorkflowSnapshot(ctx context.Context, transferID uuid.UUID) (*workflow.Snapshot, error)

GetWorkflowSnapshot returns the workflow snapshot for the transfer.

func (*Service) SetStateData

func (s *Service) SetStateData(ctx context.Context, transferID uuid.UUID, stateData map[string]any, opts ...repos.Option) error

SetStateData sets the state data for the transfer.

func (*Service) SetStatus

func (s *Service) SetStatus(ctx context.Context, transferID uuid.UUID, status constants.TransferStatus, opts ...repos.Option) error

SetStatus sets the status for the transfer.

func (*Service) SetTxHash

func (s *Service) SetTxHash(ctx context.Context, transferID uuid.UUID, txHash string, opts ...repos.Option) (*models.Transfer, error)

SetTxHash sets the txHash for the transfer.

func (*Service) SetWorkflowSnapshot

func (s *Service) SetWorkflowSnapshot(ctx context.Context, transferID uuid.UUID, snapshot workflow.Snapshot, opts ...repos.Option) error

SetWorkflowSnapshot sets the workflow snapshot for the transfer.

Jump to

Keyboard shortcuts

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