Documentation
¶
Index ¶
- Constants
- Variables
- func CreateShowRunLoginWindow(app fyne.App) fyne.Window
- func GetLoginResolutionApiDomain() string
- func HandlerLogin(addr, prikeyorpassword, billhex, routeurl string, app fyne.App, ...) error
- func LoadBillFromDisk(channelID fields.ChannelId) (channel.ReconciliationBalanceBill, error)
- func MainNewAppRun() fyne.App
- func NewVScrollAndShowWindow(window fyne.Window, windowSize *fyne.Size, content fyne.CanvasObject) fyne.Window
- func NewVScrollWindowAndShow(app fyne.App, windowSize *fyne.Size, content fyne.CanvasObject, title string) fyne.Window
- func SetLoginResolutionApiDomain(url string)
- type ChannelPayClient
- func (c *ChannelPayClient) BindFuncCancelPayment()
- func (c *ChannelPayClient) BindFuncChangeAutoCollection(isopen int)
- func (c *ChannelPayClient) BindFuncConfirmPayment(pathselect int) string
- func (c *ChannelPayClient) BindFuncPrequeryPayment(addr, amt string) string
- func (c *ChannelPayClient) DealServicerRespondReconciliation(msg *protocol.MsgServicerRespondReconciliation)
- func (c *ChannelPayClient) InitiateReconciliation(bill *channel.OffChainCrossNodeSimplePaymentReconciliationBill)
- func (c *ChannelPayClient) ShowLogString(log string, isok bool, iserr bool)
- func (c *ChannelPayClient) ShowPaymentErrorString(err string)
- func (c *ChannelPayClient) ShowStatusLog(log string)
- func (c *ChannelPayClient) ShowWindow() error
- func (c *ChannelPayClient) UpdateBalanceShow()
- type ChannelPayUser
- func (c *ChannelPayUser) ClearBusinessExclusive()
- func (c *ChannelPayUser) ConnectServicer(wsurl string) error
- func (c *ChannelPayUser) DeleteLastBillOnDisk() error
- func (c *ChannelPayUser) GetReconciliationBalanceBillAfterLoginFromRemote() channel.ReconciliationBalanceBill
- func (c *ChannelPayUser) IsClosed() bool
- func (c *ChannelPayUser) IsInBusinessExclusive() bool
- func (c *ChannelPayUser) LoadLastBillFromDisk() (channel.ReconciliationBalanceBill, error)
- func (c *ChannelPayUser) Logout()
- func (c *ChannelPayUser) SaveLastBillToDisk(bill channel.ReconciliationBalanceBill) error
- func (c *ChannelPayUser) StartBusinessExclusive() bool
- func (c *ChannelPayUser) StartHeartbeat()
- type SignatureMachine
- func (s *SignatureMachine) CheckPaydocumentAndFillNeedSignature(paydocs *channel.ChannelPayCompleteDocuments, mustaddrs []fields.Address) (*fields.SignListMax255, error)
- func (s *SignatureMachine) CheckReconciliationFillNeedSignature(bill *channel.OffChainFormPaymentChannelRealtimeReconciliation, ...) (*fields.Sign, error)
- func (s *SignatureMachine) CleanAllPrivateKey()
- func (s *SignatureMachine) Init() error
- func (s *SignatureMachine) RemovePrivateKey(fields.Address)
- func (s *SignatureMachine) TemporaryStoragePrivateKeyForSign(string)
Constants ¶
const AccUIhtmlContent = `` /* 16664-byte string literal not displayed */
Variables ¶
var (
DevDebug bool = false // Global developer test mode
)
var ROUTE_API_URL = "https://hcpu.hacash.org"
Functions ¶
func GetLoginResolutionApiDomain ¶
func GetLoginResolutionApiDomain() string
func HandlerLogin ¶
func LoadBillFromDisk ¶
func LoadBillFromDisk(channelID fields.ChannelId) (channel.ReconciliationBalanceBill, error)
func MainNewAppRun ¶
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 ¶
func (c *ChannelPayClient) InitiateReconciliation(bill *channel.OffChainCrossNodeSimplePaymentReconciliationBill)
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 CreateChannelPayUser ¶
func CreateChannelPayUser(acc *account.Account, addr *protocol.ChannelAccountAddress, cinfo *protocol.RpcDataChannelInfo) *ChannelPayUser
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) 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)