sdk_v1

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2023 License: GPL-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	WalletDetailsDBKEY = "_wallet_details_db_key_"
	StampDetailsDBKEY  = "_stamp_details_db_key_"
	AllWalletDBKey     = "_stamp_all_wallet_db_key_V2_"
)

Variables

View Source
var (
	SErrActiveWallet = errors.New("no active wallet")
	SErrActiveStamp  = errors.New("no active stamp")
	SErrInvalid      = errors.New("invalid stamp raw data")
	SErrInsufficient = errors.New("insufficient fund")
	SErrWInUsed      = errors.New("wallet is in used")
	SErrWDuplicated  = errors.New("wallet duplicated")
)

Functions

This section is empty.

Types

type SDK

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

func NewSdk

func NewSdk(db *leveldb.DB) *SDK

func (*SDK) ActiveWallet

func (sdk *SDK) ActiveWallet(walletAddr comm.WalletAddr, auth string) (comm.Wallet, error)

func (*SDK) ConfigStamp added in v1.0.2

func (sdk *SDK) ConfigStamp(mailUser string, sAddr comm.StampAddr) error

func (*SDK) CreateWallet

func (sdk *SDK) CreateWallet(auth, name string) (comm.Wallet, error)

func (*SDK) GetStampConf added in v1.0.2

func (sdk *SDK) GetStampConf(user string) *contract.StampConf

func (*SDK) GetWallet

func (sdk *SDK) GetWallet(addr comm.WalletAddr) (comm.Wallet, error)

func (*SDK) ImportWallet added in v1.0.2

func (sdk *SDK) ImportWallet(walletJson, auth string) (comm.Wallet, error)

func (*SDK) ListAllWalletAddr

func (sdk *SDK) ListAllWalletAddr() string

func (*SDK) PostStamp

func (sdk *SDK) PostStamp(mailUser string, sData comm.StampData) (comm.Stamp, error)

func (*SDK) RemoveWallet added in v1.0.2

func (sdk *SDK) RemoveWallet(addr comm.WalletAddr) error

func (*SDK) UpdateStampBalanceAsync

func (sdk *SDK) UpdateStampBalanceAsync(mailUser string)

func (*SDK) VerifyStamp

func (sdk *SDK) VerifyStamp(stampStr, mailID string) error

Jump to

Keyboard shortcuts

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