Documentation ¶
Index ¶
- Constants
- Variables
- func DownloadWalletBackupFile(token string, qs []string) (fileBinary []byte, err error)
- func RandomString(length int) string
- type BackupWalletRequest
- type BackupWalletResponse
- type CallbackStruct
- type CommonResponse
- func DecryptMessage(request *DecryptMessageRequest, qs []string) (response *CommonResponse, err error)
- func SignMessage(request *SignMessageRequest, qs []string) (response *CommonResponse, err error)
- func SignTransaction(request *SignTransactionRequest, qs []string) (response *CommonResponse, err error)
- type DecryptMessageRequest
- type ErrorCodeResponse
- type GetNonceRequest
- type GetNonceResponse
- type GetOrderStatusRequest
- type GetOrderStatusResponse
- type GetUserResponse
- type LoginVerifyRequest
- type LoginVerifyResponse
- type OrderStatus
- type PairDeviceResponse
- type RegisterUserRequest
- type RegisterUserResponse
- type RepairDeviceRequest
- type RepairDeviceResponse
- type RestoreWalletsRequest
- type RestoreWalletsResponse
- type SetupPINResponse
- type SignMessageRequest
- type SignTransactionRequest
- type UploadWalletBackupFileResponse
Constants ¶
View Source
const ( BehaviorTypeLogin = 1 BehaviorTypeSignRawTx = 2 BehaviorTypeSignSignature = 3 BehaviorTypePairedDevice = 4 BehaviorTypeSetupPIN = 5 BehaviorTypeBackup = 6 BehaviorTypeDecryptMessage = 7 )
View Source
const ( BehaviorResultPending = 0 BehaviorResultReject = 1 BehaviorResultAccept = 2 BehaviorResultExpired = 3 BehaviorResultFailed = 4 )
Variables ¶
View Source
var APICode = beego.AppConfig.DefaultString("api_code", "")
View Source
var APISecret = beego.AppConfig.DefaultString("api_secret", "")
Functions ¶
func RandomString ¶
Types ¶
type BackupWalletRequest ¶
type BackupWalletResponse ¶
func BackupWallet ¶
func BackupWallet(request *BackupWalletRequest, qs []string) (response *BackupWalletResponse, err error)
type CallbackStruct ¶
type CommonResponse ¶
type CommonResponse struct {
OrderID int64 `json:"order_id"`
}
func DecryptMessage ¶
func DecryptMessage(request *DecryptMessageRequest, qs []string) (response *CommonResponse, err error)
func SignMessage ¶
func SignMessage(request *SignMessageRequest, qs []string) (response *CommonResponse, err error)
func SignTransaction ¶
func SignTransaction(request *SignTransactionRequest, qs []string) (response *CommonResponse, err error)
type DecryptMessageRequest ¶
type DecryptMessageRequest struct {
Secret string `json:"secret"`
}
type ErrorCodeResponse ¶
type GetNonceRequest ¶
type GetNonceResponse ¶
type GetNonceResponse struct {
Nonce int64 `json:"nonce"`
}
type GetOrderStatusRequest ¶
type GetOrderStatusRequest struct {
OrderIDs []int64 `json:"order_ids"`
}
type GetOrderStatusResponse ¶
type GetOrderStatusResponse struct {
OrderStatus []OrderStatus `json:"order_status"`
}
func GetOrderStatus ¶
func GetOrderStatus(request *GetOrderStatusRequest, qs []string) (response *GetOrderStatusResponse, err error)
type GetUserResponse ¶
type GetUserResponse struct { UserEmail string `json:"user_email"` CompanyID int64 `json:"company_id"` IsPairDevice bool `json:"is_pair_device"` IsSetupPin bool `json:"is_setup_pin"` IsDoBackup bool `json:"is_do_backup"` Wallets []struct { Type string `json:"type"` Address string `json:"address"` PublicKey string `json:"public_key"` } `json:"wallets"` }
func GetUser ¶
func GetUser(qs []string) (response *GetUserResponse, err error)
type LoginVerifyRequest ¶
type LoginVerifyResponse ¶
type LoginVerifyResponse struct { OrderID int64 `json:"order_id"` ExpiresAt int64 `json:"expires_at"` }
func LoginVerify ¶
func LoginVerify(request *LoginVerifyRequest, qs []string) (response *LoginVerifyResponse, err error)
type OrderStatus ¶
type PairDeviceResponse ¶
func PairDevice ¶
func PairDevice(qs []string) (response *PairDeviceResponse, err error)
type RegisterUserRequest ¶
type RegisterUserResponse ¶
type RegisterUserResponse struct {
Email string `json:"email"`
}
func RegisterUser ¶
func RegisterUser(request *RegisterUserRequest, qs []string) (response *RegisterUserResponse, err error)
type RepairDeviceRequest ¶
type RepairDeviceResponse ¶
type RepairDeviceResponse struct { OrderID int64 `json:"order_id,omitempty"` Token string `json:"token,omitempty"` URL string `json:"url,omitempty"` }
func RepairDevice ¶
func RepairDevice(request *RepairDeviceRequest, qs []string) (response *RepairDeviceResponse, err error)
type RestoreWalletsRequest ¶
type RestoreWalletsResponse ¶
type RestoreWalletsResponse struct {
Token string `json:"token"`
}
func RestoreWallets ¶
func RestoreWallets(request *RestoreWalletsRequest, qs []string) (response *RestoreWalletsResponse, err error)
type SetupPINResponse ¶
type SetupPINResponse struct {
OrderID int64 `json:"order_id"`
}
func SetupPIN ¶
func SetupPIN(qs []string) (response *SetupPINResponse, err error)
type SignMessageRequest ¶
type SignMessageRequest struct {
Message string `json:"message"`
}
type SignTransactionRequest ¶
type UploadWalletBackupFileResponse ¶
type UploadWalletBackupFileResponse struct { Token string `json:"token"` Question string `json:"question"` }
func UploadWalletBackupFile ¶
func UploadWalletBackupFile(fileBinary []byte, qs []string) (response *UploadWalletBackupFileResponse, err error)
Click to show internal directories.
Click to hide internal directories.