Eternals
  • Introduction
  • Eternia
    • Lore
    • Creatures System
      • Legend
      • Elementals
        • Fire
        • Nature
        • Earth
        • Water
        • Metal
      • Base Eternals
    • Space Stone
  • Alliance Mining Program
    • Getting Started
    • User Profile (Alliance Center)
      • Upgrade Account
      • Achievements
    • Mechanism
    • Reward Distribution
  • $ETNS (Eternals Stars Program)
    • The $ETNS System
  • Eternals Core
    • Eternals House
      • Mood
      • How to maintain a good pet's mood?
      • Decoration
      • Shop
    • Eternals Space
      • Missions
      • Mining Tower
      • Leaderboard
      • Refill Plasma
  • Eternals World
    • Gomoku
      • Game modes: Classic and Eternians
      • Battle Deck
      • Quick Match
      • Ranking Match
      • How to earn Tickets
      • How to join Eternals Gomoku
      • Missions
      • Daily Login
      • Mastery Points
      • Win Streak
      • Pet Skills
      • Leaderboard and Reward Pools
  • ETER Token
  • How To Earn With Eternals?
  • Official Links
    • Website
    • Twitter
    • Discord
    • App Store
    • Google Play
  • GDK Documentation
    • Ninety Eight Game Development Kit
    • Introduction
    • Unity
      • GDK Installation Guide
      • Update Guide
      • Examples
      • Downloads
      • Release Notes
      • API Reference
        • v1.0.0
          • NinetyEight.INEGdk
          • NinetyEight.ErrorCode
          • NinetyEight.NEGameProfile
          • NinetyEight.NEGameProfileCallback
          • NinetyEight.NEGameProfileResponse
          • NinetyEight.NEGdkConfig
          • NinetyEight.NEInitCallback
          • NinetyEight.NELoginCallback
          • NinetyEight.NELoginData
          • NinetyEight.NEProvider
          • NinetyEight.NEShopBuyCallback
          • NinetyEight.NEShopBuyResponse
          • NinetyEight.NEShopInfoCallback
          • NinetyEight.NEShopInfoResponse
          • NinetyEight.NEShopItem
          • NinetyEight.NEShopPack
          • NinetyEight.NEUserBalance
          • NinetyEight.NEUserBalanceCallback
          • NinetyEight.NEUserBalanceResponse
          • NinetyEight.NEUserPet
          • NinetyEight.NEUserPetCallback
          • NinetyEight.NEUserPetResponse
          • NinetyEight
    • Cocos Creator
      • Installation Guide
      • Update Guide
      • Examples
      • Downloads
      • Release Notes
      • API Reference
        • NinetyEight Game Development Kit - Cocos Creator
          • Enumerations
            • NinetyEight.NEEnvironment
            • NinetyEight.NEErrorCode
            • NinetyEight.NEProvider
          • Interfaces
          • Type-aliases
            • NEGameProfile
            • NEGameProfileCallback
            • NEGameProfileResponse
            • NEGdkConfig
            • NEInitCallback
            • NELoginCallback
            • NELoginData
            • NEShopBuyCallback
            • NEShopBuyResponse
            • NEShopInfoCallback
            • NEShopInfoResponse
            • NEShopItem
            • NEShopPack
            • NEUserBalance
            • NEUserBalanceCallback
            • NEUserBalanceResponse
            • NEUserPet
            • NEUserPetCallback
            • NEUserPetResponse
  • LEGAL
    • Game Terms of Use
    • Privacy Policy
    • Terms of Use
Powered by GitBook
On this page
  • Interface: INEGdk
  • Methods
  1. GDK Documentation
  2. Cocos Creator
  3. API Reference
  4. NinetyEight Game Development Kit - Cocos Creator

Interfaces

PreviousNinetyEight.NEProviderNextType-aliases

Last updated 21 days ago

negdkcc


negdkcc / INEGdk

Interface: INEGdk

Defined in:

Represents the interface for the Game Development Kit (GDK). Provides methods for initializing the GDK, logging in, managing game profiles, and interacting with the game server.

Methods

buyShopPack()

buyShopPack(packId, amount, currency, callback): void

Defined in:

Purchases a shop pack.

Parameters

packId

number

The ID of the shop pack to purchase.

amount

number

The amount to purchase.

currency

string

The currency to use for the purchase.

callback

NEShopBuyCallback

A callback function to handle the purchase result.

Returns

void


createWallet()

createWallet(): string

Creates a new wallet and returns the seed phrase.

Returns

string

The generated seed phrase.


getAddress()

getAddress(): string

Retrieves the player's address.

Returns

string

The player's address.


getAuthToken()

getAuthToken(): string

Retrieves the authentication token.

Returns

string

The authentication token.


getGameProfile()

getGameProfile(): NEGameProfile

Retrieves the player's game profile.

Returns

NEGameProfile

The player's game profile.


getProvider()

getProvider(): string

Retrieves the current provider being used for authentication.

Returns

string

The provider name (e.g., "google", "facebook").


initialize()

initialize(config, callback): void

Initializes the GDK with the provided configuration.

Parameters

config

NEGdkConfig

The configuration to initialize the GDK with.

callback

NEInitCallback

A callback function that will be invoked after initialization is complete.

Returns

void


isLoggedIn()

isLoggedIn(): boolean

Checks if the player is logged in.

Returns

boolean

true if the player is logged in, false otherwise.


isLoginCacheExpired()

isLoginCacheExpired(): boolean

Checks if the login cache is expired

Returns

boolean

true the login cache has expired or there is no login data in cache, false otherwise.


loginWithApple()

loginWithApple(callback): void

Logs in using Apple authentication.

Parameters

callback

NELoginCallback

A callback function that will be invoked with the login result.

Returns

void


loginWithEmail()

loginWithEmail(callback): void

Logs in using Email authentication.

Parameters

callback

NELoginCallback

A callback function that will be invoked with the login result.

Returns

void


loginWithFacebook()

loginWithFacebook(callback): void

Logs in using Facebook authentication.

Parameters

callback

NELoginCallback

A callback function that will be invoked with the login result.

Returns

void


loginWithGoogle()

loginWithGoogle(callback): void

Logs in using Google authentication.

Parameters

callback

NELoginCallback

A callback function that will be invoked with the login result.

Returns

void


loginWithPhrase()

loginWithPhrase(phrase, callback): void

Logs in using a phrase (e.g., seed phrase).

Parameters

phrase

string

The login phrase (seed phrase).

callback

NELoginCallback

A callback function that will be invoked with the login result.

Returns

void


loginWithProvider()

loginWithProvider(provider, callback): void

Logs in using a specific provider (e.g., Google, Facebook).

Parameters

provider

string

The provider name (e.g., "google", "facebook").

callback

NELoginCallback

A callback function that will be invoked with the login result.

Returns

void


loginWithTelegram()

loginWithTelegram(callback): void

Logs in using Telegram authentication.

Parameters

callback

NELoginCallback

A callback function that will be invoked with the login result.

Returns

void


logout()

logout(): void

Logs the player out of the system.

Returns

void


requestGameProfile()

requestGameProfile(callback): void

Requests the player's game profile.

Parameters

callback

NEGameProfileCallback

A callback function to handle the result.

Returns

void


requestShopInfo()

requestShopInfo(callback): void

Requests the available shop information.

Parameters

callback

NEShopInfoCallback

A callback function to handle the result.

Returns

void


requestUserBalances()

requestUserBalances(callback): void

Requests the player's balances.

Parameters

callback

NEUserBalanceCallback

A callback function to handle the result.

Returns

void


requestUserPets()

requestUserPets(callback): void

Requests the player's pets.

Parameters

callback

NEUserPetCallback

A callback function to handle the result.

Returns

void

Defined in:

Defined in:

Defined in:

Defined in:

Defined in:

Defined in:

Defined in:

Defined in:

Defined in:

Defined in:

Defined in:

Defined in:

Defined in:

Defined in:

Defined in:

Defined in:

Defined in:

Defined in:

Defined in:

Defined in:

interface/INEGdk.ts:58
interface/INEGdk.ts:189
interface/INEGdk.ts:71
interface/INEGdk.ts:156
interface/INEGdk.ts:150
interface/INEGdk.ts:144
interface/INEGdk.ts:138
interface/INEGdk.ts:65
interface/INEGdk.ts:132
interface/INEGdk.ts:126
interface/INEGdk.ts:115
interface/INEGdk.ts:109
interface/INEGdk.ts:97
interface/INEGdk.ts:91
interface/INEGdk.ts:78
interface/INEGdk.ts:85
interface/INEGdk.ts:103
interface/INEGdk.ts:120
interface/INEGdk.ts:162
interface/INEGdk.ts:180
interface/INEGdk.ts:174
interface/INEGdk.ts:168