Documentation ¶
Index ¶
- type Account
- type DevAccountService
- func (das *DevAccountService) AddVoucher(ctx context.Context, symbol string) error
- func (das *DevAccountService) CheckAliasAddress(ctx context.Context, alias string) (*models.AliasAddress, error)
- func (das *DevAccountService) CheckBalance(ctx context.Context, publicKey string) (*models.BalanceResult, error)
- func (das *DevAccountService) CreateAccount(ctx context.Context) (*models.AccountResult, error)
- func (das *DevAccountService) FetchTransactions(ctx context.Context, publicKey string) ([]dataserviceapi.Last10TxResponse, error)
- func (das *DevAccountService) FetchVouchers(ctx context.Context, publicKey string) ([]dataserviceapi.TokenHoldings, error)
- func (das *DevAccountService) GetAliases(ctx context.Context) map[string]string
- func (das *DevAccountService) RequestAlias(ctx context.Context, publicKey string, hint string) (*models.RequestAliasResult, error)
- func (das *DevAccountService) TokenTransfer(ctx context.Context, amount, from, to, tokenAddress string) (*models.TokenTransferResponse, error)
- func (das *DevAccountService) TrackAccountStatus(ctx context.Context, publicKey string) (*models.TrackStatusResult, error)
- func (das *DevAccountService) VoucherData(ctx context.Context, address string) (*models.VoucherDataResult, error)
- func (das *DevAccountService) WithAutoVoucher(ctx context.Context, symbol string, value int) *DevAccountService
- func (das *DevAccountService) WithEmitter(fn event.EmitterFunc) *DevAccountService
- func (das *DevAccountService) WithPrefix(pfx []byte) *DevAccountService
- type Tx
- type Voucher
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Account ¶
type Account struct { Track string `json: "track"` Address string `json: "address"` Nonce int `json: "nonce"` DefaultVoucher string `json: "defaultVoucher"` Balances map[string]int `json: "balances"` Alias string Txs []string `json: "txs"` }
func (*Account) ToRegistrationEvent ¶
func (a *Account) ToRegistrationEvent() event.EventCustodialRegistration
type DevAccountService ¶
type DevAccountService struct {
// contains filtered or unexported fields
}
func NewDevAccountService ¶
func NewDevAccountService(ctx context.Context, ss storage.StorageService) *DevAccountService
func (*DevAccountService) AddVoucher ¶
func (das *DevAccountService) AddVoucher(ctx context.Context, symbol string) error
TODO: add persistence for vouchers TODO: set max balance for 0x00 address
func (*DevAccountService) CheckAliasAddress ¶
func (das *DevAccountService) CheckAliasAddress(ctx context.Context, alias string) (*models.AliasAddress, error)
func (*DevAccountService) CheckBalance ¶
func (das *DevAccountService) CheckBalance(ctx context.Context, publicKey string) (*models.BalanceResult, error)
func (*DevAccountService) CreateAccount ¶
func (das *DevAccountService) CreateAccount(ctx context.Context) (*models.AccountResult, error)
func (*DevAccountService) FetchTransactions ¶
func (das *DevAccountService) FetchTransactions(ctx context.Context, publicKey string) ([]dataserviceapi.Last10TxResponse, error)
func (*DevAccountService) FetchVouchers ¶
func (das *DevAccountService) FetchVouchers(ctx context.Context, publicKey string) ([]dataserviceapi.TokenHoldings, error)
func (*DevAccountService) GetAliases ¶
func (das *DevAccountService) GetAliases(ctx context.Context) map[string]string
func (*DevAccountService) RequestAlias ¶
func (das *DevAccountService) RequestAlias(ctx context.Context, publicKey string, hint string) (*models.RequestAliasResult, error)
func (*DevAccountService) TokenTransfer ¶
func (das *DevAccountService) TokenTransfer(ctx context.Context, amount, from, to, tokenAddress string) (*models.TokenTransferResponse, error)
TODO: set default voucher on first received TODO: update balance
func (*DevAccountService) TrackAccountStatus ¶
func (das *DevAccountService) TrackAccountStatus(ctx context.Context, publicKey string) (*models.TrackStatusResult, error)
func (*DevAccountService) VoucherData ¶
func (das *DevAccountService) VoucherData(ctx context.Context, address string) (*models.VoucherDataResult, error)
func (*DevAccountService) WithAutoVoucher ¶
func (das *DevAccountService) WithAutoVoucher(ctx context.Context, symbol string, value int) *DevAccountService
func (*DevAccountService) WithEmitter ¶
func (das *DevAccountService) WithEmitter(fn event.EmitterFunc) *DevAccountService
func (*DevAccountService) WithPrefix ¶
func (das *DevAccountService) WithPrefix(pfx []byte) *DevAccountService
type Tx ¶
type Tx struct { Track string `json: "track"` Hsh string `json:"hash"` To string `json:"to"` From string `json: "from"` Voucher string `json: "voucher"` Value int `json: "value"` When time.Time `json: "when"` }
func (*Tx) ToMintEvent ¶
func (t *Tx) ToMintEvent() event.EventTokenMint
func (*Tx) ToTransferEvent ¶
func (t *Tx) ToTransferEvent() event.EventTokenTransfer
Click to show internal directories.
Click to hide internal directories.