Documentation ¶
Overview ¶
Methods and types to represent client's wallet.
Index ¶
- Constants
- Variables
- func ExitWithError(v ...interface{})
- func PrintError(v ...interface{})
- type ZCNStatus
- func (zcn *ZCNStatus) Begin()
- func (zcn *ZCNStatus) OnAuthorizeSendComplete(status int, _ string, _ int64, _ string, creationDate int64, signature string)
- func (zcn *ZCNStatus) OnBalanceAvailable(status int, value int64, _ string)
- func (zcn *ZCNStatus) OnInfoAvailable(op int, status int, info string, err string)
- func (zcn *ZCNStatus) OnSetupComplete(_ int, _ string)
- func (zcn *ZCNStatus) OnVoteComplete(status int, proposal string, err string)
- func (zcn *ZCNStatus) OnWalletCreateComplete(status int, wallet string, err string)
- func (zcn *ZCNStatus) Wait() error
Constants ¶
View Source
const ( ZCNSCSmartContractAddress = "6dba10422e368813802877a85039d3985d96760ed844092319743fb3a76712e0" MintFunc = "mint" BurnFunc = "burn" BurnWzcnTicketPath = "/v1/ether/burnticket/" BurnWzcnBurnEventsPath = "/v1/ether/burnevents/" BurnNativeTicketPath = "/v1/0chain/burnticket/" )
Variables ¶
View Source
var Logger logger.Logger
Functions ¶
func ExitWithError ¶
func ExitWithError(v ...interface{})
func PrintError ¶
func PrintError(v ...interface{})
Types ¶
type ZCNStatus ¶
type ZCNStatus struct { Wg *sync.WaitGroup Success bool Err error // contains filtered or unexported fields }
ZCNStatus represents the status of a ZCN operation.
func NewZCNStatus ¶
func NewZCNStatus(value interface{}) (zcns *ZCNStatus)
NewZCNStatus creates a new ZCNStatus instance.
- value: value to be stored in the ZCNStatus instance
func (*ZCNStatus) OnAuthorizeSendComplete ¶
func (zcn *ZCNStatus) OnAuthorizeSendComplete(status int, _ string, _ int64, _ string, creationDate int64, signature string)
OnAuthorizeSendComplete callback when authorization is completed
- status: status of the operation
- 2nd parameter is not used, it is kept for compatibility
- 3rd parameter is not used, it is kept for compatibility
- 4th parameter is not used, it is kept for compatibility
- creationDate: timestamp of the creation date
- signature: signature of the operation
func (*ZCNStatus) OnBalanceAvailable ¶
OnBalanceAvailable callback when balance is available
- status: status of the operation
- value: balance value
- third parameter is not used, it is kept for compatibility
func (*ZCNStatus) OnInfoAvailable ¶
OnInfoAvailable callback when information is available
- op`: operation type (check `zcncore.Op* constants)
- status: status of the operation
- info: information represneted as a string
- err: error message
func (*ZCNStatus) OnSetupComplete ¶
OnSetupComplete callback when setup is completed. Paramters are not used in this implementation, just kept for compatibility.
func (*ZCNStatus) OnVoteComplete ¶
OnVoteComplete callback when a multisig vote is completed
- status: status of the operation
- proposal: proposal json string
- err: error message
func (*ZCNStatus) OnWalletCreateComplete ¶
OnWalletCreateComplete callback when a wallet is created
- status: status of the operation
- wallet: wallet json string
Click to show internal directories.
Click to hide internal directories.