service

package
v0.0.0-...-8538e32 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuditView

type AuditView struct{}

func (*AuditView) Call

func (v *AuditView) Call(context view.Context) (interface{}, error)

type RegisterAuditorView

type RegisterAuditorView struct{}

func (*RegisterAuditorView) Call

func (r *RegisterAuditorView) Call(context view.Context) (interface{}, error)

type TokenService

type TokenService struct {
	FSC api.ServiceProvider
}

func (TokenService) GetBalance

func (s TokenService) GetBalance(wallet string, tokenType string) (typeVal ValueByTokenType, err error)

GetBalance returns the balances per token type of a wallet

func (TokenService) GetHistory

func (s TokenService) GetHistory(wallet string) (txs []TransactionHistoryItem, err error)

GetHistory returns the full transaction history for an auditor.

type TransactionHistoryItem

type TransactionHistoryItem struct {
	// TxID is the transaction ID
	TxID string
	// ActionType is the type of action performed by this transaction record
	ActionType int
	// SenderEID is the enrollment ID of the account that is sending tokens
	Sender string
	// RecipientEID is the enrollment ID of the account that is receiving tokens
	Recipient string
	// TokenType is the type of token
	TokenType string
	// Amount is positive if tokens are received. Negative otherwise
	Amount int64
	// Timestamp is the time the transaction was submitted to the db
	Timestamp time.Time
	// Status is the status of the transaction
	Status string
	// Message is the user message sent with the transaction. It comes from
	// the ApplicationMetadata and is sent in the transient field
	Message string
}

type ValueByTokenType

type ValueByTokenType map[string]int64

SERVICE

Jump to

Keyboard shortcuts

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