handlers

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2020 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ChainHandlerKey = "Key.ChainHandlerKey"
)

Variables

View Source
var (
	ErrInvalidChain     = errors.New("Invalid Chain")
	ErrInvalidAccountID = errors.New("Invalid AccountID")
	ErrGenAddress       = errors.New("Gen Address Error")
)
View Source
var (
	ErrInternalError = errors.New("Internal Error")
)

Functions

func AddressInfo added in v0.0.5

func AddressInfo(ctx context.Context, address common.AddressInfo) (common.AddressInfo, error)

func ChainHandlerContext

func ChainHandlerContext(ctx context.Context, chain ChainHandler) context.Context

func CryptoAddressNewDeposit added in v0.0.4

func CryptoAddressNewDeposit(ctx context.Context, address common.CryptoAddress) (common.CryptoAddress, error)

func CryptoAddressNextDeposit

func CryptoAddressNextDeposit(ctx context.Context, address common.CryptoAddress) (common.CryptoAddress, error)

func OnAddressInfo added in v0.0.5

func OnAddressInfo(ctx context.Context, subject string, message *bank.Message) (*bank.Message, error)

func OnCryptoAddressNewDeposit added in v0.0.4

func OnCryptoAddressNewDeposit(ctx context.Context, subject string, message *bank.Message) (*bank.Message, error)

func OnCryptoAddressNextDeposit

func OnCryptoAddressNextDeposit(ctx context.Context, subject string, message *bank.Message) (*bank.Message, error)

Types

type ChainHandler

type ChainHandler interface {
	GetNewAddress(ctx context.Context, chain, account string) (string, error)
	ImportAddress(ctx context.Context, chain, account, address, pubkey, blindingkey string) error
	GetAddressInfo(ctx context.Context, chain, address string) (common.AddressInfo, error)
}

func ChainHandlerFromContext

func ChainHandlerFromContext(ctx context.Context) ChainHandler

Jump to

Keyboard shortcuts

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