zboxapi

package
v1.18.0-RC1 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Subpackage to provide interface for zboxapi SDK (dealing with apps backend) to be used to build the mobile SDK.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrZboxApiNotInitialized = errors.New("zboxapi: zboxapi client is not initialized")
	ErrZboxApiInvalidWallet  = errors.New("zboxapi: invalid wallet")
)

Functions

func CreateJwtToken

func CreateJwtToken(userID, accessToken string) (string, error)

CreateJwtToken creates JWT token with the help of provided userID.

func GetCsrfToken

func GetCsrfToken() (string, error)

GetCsrfToken create a fresh CSRF token

func Init

func Init(baseUrl, appType string)

Init initialize the zbox api client for the mobile sdk

  • baseUrl is the base url of the server
  • appType is the type of the application

func RefreshJwtToken

func RefreshJwtToken(userID string, token string) (string, error)

RefreshJwtToken refreshes JWT token

func SetWallet

func SetWallet(clientID, clientPrivateKey, clientPublicKey string) error

SetWallet set the client's wallet information for the zbox api client

  • clientID is the client id
  • clientPrivateKey is the client private key
  • clientPublicKey is the client public key

Types

This section is empty.

Jump to

Keyboard shortcuts

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