Preparing search index...
The search index is not available
@magicblock-labs/soar-sdk
@magicblock-labs/soar-sdk
GameClient
Class GameClient
Class representing actions on a single Game.
Hierarchy
GameClient
Index
Constructors
constructor
Properties
account
address
program
Methods
add
Achievement
add
Leader
Board
fetch
Achievement
Accounts
fetch
Leader
Board
Accounts
init
next
Achievement
Address
next
Leader
Board
Address
recent
Achievement
Address
recent
Leader
Board
Address
refresh
register
Player
submit
Score
update
update
Achievement
register
Constructors
constructor
new
Game
Client
(
program
,
address
,
account
?
)
:
GameClient
Parameters
program
:
SoarProgram
address
:
PublicKey
Optional
account
:
GameAccount
Returns
GameClient
Properties
account
account
:
undefined
|
GameAccount
address
address
:
PublicKey
program
program
:
SoarProgram
Methods
add
Achievement
add
Achievement
(
authority
,
title
,
description
,
nftMeta
)
:
Promise
<
AddGameAchievement
>
Parameters
authority
:
PublicKey
title
:
string
description
:
string
nftMeta
:
PublicKey
Returns
Promise
<
AddGameAchievement
>
add
Leader
Board
add
Leader
Board
(
authority
,
description
,
nftMeta
,
scoresToRetain
,
scoresOrder
,
decimals
?
,
minScore
?
,
maxScore
?
)
:
Promise
<
AddLeaderBoard
>
Parameters
authority
:
PublicKey
description
:
string
nftMeta
:
PublicKey
scoresToRetain
:
number
scoresOrder
:
boolean
Optional
decimals
:
number
Optional
minScore
:
BN
Optional
maxScore
:
BN
Returns
Promise
<
AddLeaderBoard
>
fetch
Achievement
Accounts
fetch
Achievement
Accounts
(
)
:
Promise
<
AchievementAccount
[]
>
Returns
Promise
<
AchievementAccount
[]
>
fetch
Leader
Board
Accounts
fetch
Leader
Board
Accounts
(
)
:
Promise
<
LeaderBoardAccount
[]
>
Returns
Promise
<
LeaderBoardAccount
[]
>
init
init
(
)
:
Promise
<
void
>
Returns
Promise
<
void
>
next
Achievement
Address
next
Achievement
Address
(
)
:
PublicKey
Returns
PublicKey
next
Leader
Board
Address
next
Leader
Board
Address
(
)
:
PublicKey
Returns
PublicKey
recent
Achievement
Address
recent
Achievement
Address
(
)
:
PublicKey
Returns
PublicKey
recent
Leader
Board
Address
recent
Leader
Board
Address
(
)
:
PublicKey
Returns
PublicKey
refresh
refresh
(
)
:
Promise
<
void
>
Returns
Promise
<
void
>
register
Player
register
Player
(
user
,
leaderBoard
?
)
:
Promise
<
RegisterPlayerEntry
>
Parameters
user
:
PublicKey
Optional
leaderBoard
:
PublicKey
Returns
Promise
<
RegisterPlayerEntry
>
submit
Score
submit
Score
(
user
,
authority
,
score
,
leaderBoard
?
)
:
Promise
<
SubmitScore
>
Parameters
user
:
PublicKey
authority
:
PublicKey
score
:
BN
Optional
leaderBoard
:
PublicKey
Returns
Promise
<
SubmitScore
>
update
update
(
authority
,
newMeta
?
,
newAuths
?
)
:
Promise
<
UpdateGame
>
Parameters
authority
:
PublicKey
Optional
newMeta
:
GameAttributes
Optional
newAuths
:
PublicKey
[]
Returns
Promise
<
UpdateGame
>
update
Achievement
update
Achievement
(
authority
,
achievement
,
newTitle
?
,
newDescription
?
,
newNftMeta
?
)
:
Promise
<
UpdateAchievement
>
Parameters
authority
:
PublicKey
achievement
:
PublicKey
Optional
newTitle
:
string
Optional
newDescription
:
string
Optional
newNftMeta
:
PublicKey
Returns
Promise
<
UpdateAchievement
>
Static
register
register
(
program
,
title
,
description
,
genre
,
gameType
,
nftMeta
,
auths
)
:
Promise
<
GameClient
>
Parameters
program
:
SoarProgram
title
:
string
description
:
string
genre
:
Genre
gameType
:
GameType
nftMeta
:
PublicKey
auths
:
PublicKey
[]
Returns
Promise
<
GameClient
>
Settings
Member Visibility
Protected
Inherited
Theme
OS
Light
Dark
On This Page
constructor
account
address
program
add
Achievement
add
Leader
Board
fetch
Achievement
Accounts
fetch
Leader
Board
Accounts
init
next
Achievement
Address
next
Leader
Board
Address
recent
Achievement
Address
recent
Leader
Board
Address
refresh
register
Player
submit
Score
update
update
Achievement
register
@magicblock-labs/soar-sdk
GameType
Genre
AccountsBuilder
GameClient
InstructionBuilder
SoarProgram
Soar
IDL
Generated using
TypeDoc
Class representing actions on a single Game.