logic

package
v0.0.0-...-13d5c5d Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2018 License: Apache-2.0 Imports: 33 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Add string = "add"
	Del string = "del"
)
View Source
const (
	DefaultFile = "headers.dat"
)

Variables

This section is empty.

Functions

func DumpHeaders

func DumpHeaders(ctx context.Context, h *electrum.BlockchainHeader)

func EstimateFee

func EstimateFee(c *gin.Context) *view.FeeRate

func NewMfa

func NewMfa(uuid string) *view.MfaVO

func ProvisionUri

func ProvisionUri(secret string, user string, issuer string) string

func Round

func Round(f float64, n int) float64

func UpdateMfa

func UpdateMfa(wallet *common.Wallet, param view.WalletUpdateParam) bool

func VerifyMfa

func VerifyMfa(token string, secret string) bool

Types

type AccountService

type AccountService struct{}

func (*AccountService) ChallengeLogic

func (a *AccountService) ChallengeLogic(uuid string) (*view.ChallengeVO, error)

func (*AccountService) CreateWallet

func (a *AccountService) CreateWallet(c *gin.Context, param *view.WalletCreateParam) error

* Create wallet && update Session PubKey

func (*AccountService) LoginWallet

func (a *AccountService) LoginWallet(c *gin.Context, param view.WalletLoginParam) (*view.WalletVO, error)

func (*AccountService) NewMfa

func (a *AccountService) NewMfa(uuid string) *view.MfaVO

func (*AccountService) UpdateWallet

func (a *AccountService) UpdateWallet(c *gin.Context, param view.WalletUpdateParam) error

* update Wallet info

func (*AccountService) VerifyWallet

func (a *AccountService) VerifyWallet(param view.WalletVerifyParam) error

type ChangeIssuerTransaction

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

func (*ChangeIssuerTransaction) Check

func (changeIssuer *ChangeIssuerTransaction) Check(c *gin.Context) error

func (*ChangeIssuerTransaction) CreatePayload

func (changeIssuer *ChangeIssuerTransaction) CreatePayload(c *gin.Context) (string, error)

type CheckParamsAndGetPayload

type CheckParamsAndGetPayload interface {
	Check(*gin.Context) error
	CreatePayload(c *gin.Context) (string, error)
}

func FactoryForTxCheckAndCreate

func FactoryForTxCheckAndCreate(txType int) CheckParamsAndGetPayload

type CloseCrowdSaleTransaction

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

func (*CloseCrowdSaleTransaction) Check

func (closeCrowdSale *CloseCrowdSaleTransaction) Check(c *gin.Context) error

func (*CloseCrowdSaleTransaction) CreatePayload

func (closeCrowdSale *CloseCrowdSaleTransaction) CreatePayload(c *gin.Context) (string, error)

type CrowdSaleIssuanceTransaction

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

func (*CrowdSaleIssuanceTransaction) Check

func (crowSale *CrowdSaleIssuanceTransaction) Check(c *gin.Context) error

func (*CrowdSaleIssuanceTransaction) CreatePayload

func (crowSale *CrowdSaleIssuanceTransaction) CreatePayload(c *gin.Context) (string, error)

type ErrNulldataLength

type ErrNulldataLength struct {
	Msg string
}

func (*ErrNulldataLength) Error

func (en *ErrNulldataLength) Error() string

type FixedIssuanceTransaction

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

func (*FixedIssuanceTransaction) Check

func (fixedIssuance *FixedIssuanceTransaction) Check(c *gin.Context) error

func (*FixedIssuanceTransaction) CreatePayload

func (fixedIssuance *FixedIssuanceTransaction) CreatePayload(c *gin.Context) (string, error)

type FreezeTokenTransaction

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

func (*FreezeTokenTransaction) Check

func (simpleSend *FreezeTokenTransaction) Check(c *gin.Context) error

func (*FreezeTokenTransaction) CreatePayload

func (simpleSend *FreezeTokenTransaction) CreatePayload(c *gin.Context) (string, error)

type GetWhcTransaction

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

func (*GetWhcTransaction) Check

func (burn *GetWhcTransaction) Check(c *gin.Context) error

func (*GetWhcTransaction) CreatePayload

func (burn *GetWhcTransaction) CreatePayload(c *gin.Context) (string, error)

type ManagedIssuanceTransaction

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

func (*ManagedIssuanceTransaction) Check

func (managedIssuance *ManagedIssuanceTransaction) Check(c *gin.Context) error

func (*ManagedIssuanceTransaction) CreatePayload

func (managedIssuance *ManagedIssuanceTransaction) CreatePayload(c *gin.Context) (string, error)

type ParticipateCrowdSaleTransaction

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

func (*ParticipateCrowdSaleTransaction) Check

func (*ParticipateCrowdSaleTransaction) CreatePayload

func (partic *ParticipateCrowdSaleTransaction) CreatePayload(c *gin.Context) (string, error)

type RevokeTransaction

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

func (*RevokeTransaction) Check

func (revoke *RevokeTransaction) Check(c *gin.Context) error

func (*RevokeTransaction) CreatePayload

func (revoke *RevokeTransaction) CreatePayload(c *gin.Context) (string, error)

type SendAllTransaction

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

func (*SendAllTransaction) Check

func (sendAll *SendAllTransaction) Check(c *gin.Context) error

func (*SendAllTransaction) CreatePayload

func (sendAll *SendAllTransaction) CreatePayload(c *gin.Context) (string, error)

type SendGrantTransaction

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

func (*SendGrantTransaction) Check

func (grant *SendGrantTransaction) Check(c *gin.Context) error

func (*SendGrantTransaction) CreatePayload

func (grant *SendGrantTransaction) CreatePayload(c *gin.Context) (string, error)

type SendStoTransaction

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

func (*SendStoTransaction) Check

func (sendSto *SendStoTransaction) Check(c *gin.Context) error

func (*SendStoTransaction) CreatePayload

func (sendSto *SendStoTransaction) CreatePayload(c *gin.Context) (string, error)

type SimpleSendTransaction

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

func (*SimpleSendTransaction) Check

func (simpleSend *SimpleSendTransaction) Check(c *gin.Context) error

func (*SimpleSendTransaction) CreatePayload

func (simpleSend *SimpleSendTransaction) CreatePayload(c *gin.Context) (string, error)

type UnFreezeTokenTransaction

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

func (*UnFreezeTokenTransaction) Check

func (simpleSend *UnFreezeTokenTransaction) Check(c *gin.Context) error

func (*UnFreezeTokenTransaction) CreatePayload

func (simpleSend *UnFreezeTokenTransaction) CreatePayload(c *gin.Context) (string, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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