client

package
v0.1.20 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2023 License: MIT Imports: 29 Imported by: 0

Documentation

Index

Constants

View Source
const AccUIhtmlContent = `` /* 16664-byte string literal not displayed */

Variables

View Source
var (
	DevDebug bool = false // Global developer test mode
)
View Source
var ROUTE_API_URL = "https://hcpu.hacash.org"

Functions

func CreateShowRunLoginWindow

func CreateShowRunLoginWindow(app fyne.App) fyne.Window

func GetLoginResolutionApiDomain

func GetLoginResolutionApiDomain() string

func HandlerLogin

func HandlerLogin(addr, prikeyorpassword, billhex, routeurl string, app fyne.App, window fyne.Window, loginBtn *widget.Button) error

func LoadBillFromDisk

func LoadBillFromDisk(channelID fields.ChannelId) (channel.ReconciliationBalanceBill, error)

func MainNewAppRun

func MainNewAppRun() fyne.App

func NewVScrollAndShowWindow

func NewVScrollAndShowWindow(window fyne.Window, windowSize *fyne.Size, content fyne.CanvasObject) fyne.Window

open windows

func NewVScrollWindowAndShow

func NewVScrollWindowAndShow(app fyne.App, windowSize *fyne.Size, content fyne.CanvasObject, title string) fyne.Window

open windows

func SetLoginResolutionApiDomain

func SetLoginResolutionApiDomain(url string)

Types

type ChannelPayClient

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

*

  • 通道链支付客户端

func CreateChannelPayClient

func CreateChannelPayClient(app fyne.App, user *ChannelPayUser, lgwd fyne.Window) *ChannelPayClient

func (*ChannelPayClient) BindFuncCancelPayment

func (c *ChannelPayClient) BindFuncCancelPayment()

Cancel payment

func (*ChannelPayClient) BindFuncChangeAutoCollection

func (c *ChannelPayClient) BindFuncChangeAutoCollection(isopen int)

Close automatic collection

func (*ChannelPayClient) BindFuncConfirmPayment

func (c *ChannelPayClient) BindFuncConfirmPayment(pathselect int) string

Confirm to launch transaction Return string returns an error or is empty

func (*ChannelPayClient) BindFuncPrequeryPayment

func (c *ChannelPayClient) BindFuncPrequeryPayment(addr, amt string) string

Start transaction

func (*ChannelPayClient) DealServicerRespondReconciliation

func (c *ChannelPayClient) DealServicerRespondReconciliation(msg *protocol.MsgServicerRespondReconciliation)

Reconciliation return

func (*ChannelPayClient) InitiateReconciliation

Start reconciliation

func (*ChannelPayClient) ShowLogString

func (c *ChannelPayClient) ShowLogString(log string, isok bool, iserr bool)

Show log

func (*ChannelPayClient) ShowPaymentErrorString

func (c *ChannelPayClient) ShowPaymentErrorString(err string)

Show payment errors

func (*ChannelPayClient) ShowStatusLog

func (c *ChannelPayClient) ShowStatusLog(log string)

func (*ChannelPayClient) ShowWindow

func (c *ChannelPayClient) ShowWindow() error

Display interface

func (*ChannelPayClient) UpdateBalanceShow

func (c *ChannelPayClient) UpdateBalanceShow()

Update interface display

type ChannelPayUser

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

*

  • 通道链支付用户端

func (*ChannelPayUser) ClearBusinessExclusive

func (c *ChannelPayUser) ClearBusinessExclusive()

Remove state exclusivity

func (*ChannelPayUser) ConnectServicer

func (c *ChannelPayUser) ConnectServicer(wsurl string) error

Connect to the server

func (*ChannelPayUser) DeleteLastBillOnDisk

func (c *ChannelPayUser) DeleteLastBillOnDisk() error

Delete local ticket

func (*ChannelPayUser) GetReconciliationBalanceBillAfterLoginFromRemote

func (c *ChannelPayUser) GetReconciliationBalanceBillAfterLoginFromRemote() channel.ReconciliationBalanceBill

Obtain reconciliation bills remotely after login

func (*ChannelPayUser) IsClosed

func (c *ChannelPayUser) IsClosed() bool

sign out

func (*ChannelPayUser) IsInBusinessExclusive

func (c *ChannelPayUser) IsInBusinessExclusive() bool

Check whether the collection channel is occupied

func (*ChannelPayUser) LoadLastBillFromDisk

func (c *ChannelPayUser) LoadLastBillFromDisk() (channel.ReconciliationBalanceBill, error)

Read local reconciliation bills

func (*ChannelPayUser) Logout

func (c *ChannelPayUser) Logout()

func (*ChannelPayUser) SaveLastBillToDisk

func (c *ChannelPayUser) SaveLastBillToDisk(bill channel.ReconciliationBalanceBill) error

Save reconciliation bill

func (*ChannelPayUser) StartBusinessExclusive

func (c *ChannelPayUser) StartBusinessExclusive() bool

Where state exclusive

func (*ChannelPayUser) StartHeartbeat

func (c *ChannelPayUser) StartHeartbeat()

Start sending heartbeat packets

type SignatureMachine

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

Signature machine

func NewSignatureMachine

func NewSignatureMachine(acc *account.Account) *SignatureMachine

func (*SignatureMachine) CheckPaydocumentAndFillNeedSignature

func (s *SignatureMachine) CheckPaydocumentAndFillNeedSignature(paydocs *channel.ChannelPayCompleteDocuments, mustaddrs []fields.Address) (*fields.SignListMax255, error)

Send the channel transaction to the signer to verify the data, and automatically fill in the signature

func (*SignatureMachine) CheckReconciliationFillNeedSignature

func (s *SignatureMachine) CheckReconciliationFillNeedSignature(bill *channel.OffChainFormPaymentChannelRealtimeReconciliation, checksign *fields.Sign) (*fields.Sign, error)

Sign the statement and then check all signatures

func (*SignatureMachine) CleanAllPrivateKey

func (s *SignatureMachine) CleanAllPrivateKey()

func (*SignatureMachine) Init

func (s *SignatureMachine) Init() error

func (*SignatureMachine) RemovePrivateKey

func (s *SignatureMachine) RemovePrivateKey(fields.Address)

func (*SignatureMachine) TemporaryStoragePrivateKeyForSign

func (s *SignatureMachine) TemporaryStoragePrivateKeyForSign(string)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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