Properties
Readonly
provider
provider: AnchorProvider
Readonly
utils
utils: Utils
Methods
addFungibleReward
- addFungibleReward(authority, newReward, achievement, amountPerUser, availableRewards, initialDelegation, mint, sourceTokenAccount, tokenAccountOwner): Promise<AddReward>
-
Parameters
-
authority: PublicKey
-
newReward: PublicKey
-
achievement: PublicKey
-
amountPerUser: BN
-
availableRewards: BN
-
initialDelegation: BN
-
mint: PublicKey
-
sourceTokenAccount: PublicKey
-
tokenAccountOwner: PublicKey
Returns Promise<AddReward>
addNewGameAchievement
- addNewGameAchievement(gameAddress, authority, title, description, nftMeta): Promise<AddGameAchievement>
-
Parameters
-
gameAddress: PublicKey
-
authority: PublicKey
-
title: string
-
description: string
-
nftMeta: PublicKey
Returns Promise<AddGameAchievement>
addNewGameLeaderBoard
- addNewGameLeaderBoard(gameAddress, authority, description, nftMeta, scoresToRetain, scoresOrder, decimals?, minScore?, maxScore?): Promise<AddLeaderBoard>
-
Parameters
-
gameAddress: PublicKey
-
authority: PublicKey
-
description: string
-
nftMeta: PublicKey
-
scoresToRetain: number
-
scoresOrder: boolean
-
Optional
decimals: number
-
Optional
minScore: BN
-
Optional
maxScore: BN
Returns Promise<AddLeaderBoard>
addNonFungibleReward
- addNonFungibleReward(authority, newReward, achievement, availableRewards, uri, name, symbol, collectionMint?, collectionUpdateAuthority?): Promise<AddReward>
-
Parameters
-
authority: PublicKey
-
newReward: PublicKey
-
achievement: PublicKey
-
availableRewards: BN
-
uri: string
-
name: string
-
symbol: string
-
Optional
collectionMint: PublicKey
-
Optional
collectionUpdateAuthority: PublicKey
Returns Promise<AddReward>
claimFtReward
- claimFtReward(authority, achievement, user): Promise<ClaimFtReward>
-
Parameters
-
authority: PublicKey
-
achievement: PublicKey
-
user: PublicKey
Returns Promise<ClaimFtReward>
claimNftReward
- claimNftReward(authority, achievement, mint, user): Promise<ClaimNftReward>
-
Parameters
-
authority: PublicKey
-
achievement: PublicKey
-
mint: PublicKey
-
user: PublicKey
Returns Promise<ClaimNftReward>
fetchAchievementAccount
- fetchAchievementAccount(address): Promise<AchievementAccount>
-
Returns Promise<AchievementAccount>
fetchAllAchievementAccounts
- fetchAllAchievementAccounts(memcmp?): Promise<AchievementAccount[]>
-
Parameters
-
Optional
memcmp: Buffer | GetProgramAccountsFilter[]
Returns Promise<AchievementAccount[]>
fetchAllGameAccounts
- fetchAllGameAccounts(memcmp?): Promise<GameAccount[]>
-
Parameters
-
Optional
memcmp: Buffer | GetProgramAccountsFilter[]
Returns Promise<GameAccount[]>
fetchAllLeaderboardAccounts
- fetchAllLeaderboardAccounts(memcmp?): Promise<LeaderBoardAccount[]>
-
Parameters
-
Optional
memcmp: Buffer | GetProgramAccountsFilter[]
Returns Promise<LeaderBoardAccount[]>
fetchAllPlayerAccounts
- fetchAllPlayerAccounts(memcmp?): Promise<PlayerAccount[]>
-
Parameters
-
Optional
memcmp: Buffer | GetProgramAccountsFilter[]
Returns Promise<PlayerAccount[]>
fetchGameAccount
- fetchGameAccount(address): Promise<GameAccount>
-
Returns Promise<GameAccount>
fetchGameAccountsInfoByGenre
- fetchGameAccountsInfoByGenre(genre): Promise<GameAccount[]>
-
Returns Promise<GameAccount[]>
fetchLeaderBoardAccount
- fetchLeaderBoardAccount(address): Promise<LeaderBoardAccount>
-
Returns Promise<LeaderBoardAccount>
fetchLeaderBoardTopEntriesAccount
- fetchLeaderBoardTopEntriesAccount(address): Promise<TopEntriesAccount>
-
Returns Promise<TopEntriesAccount>
fetchMergedAccount
- fetchMergedAccount(address): Promise<MergedAccount>
-
Returns Promise<MergedAccount>
fetchPlayerAccount
- fetchPlayerAccount(address): Promise<PlayerAccount>
-
Returns Promise<PlayerAccount>
fetchPlayerAchievementAccount
- fetchPlayerAchievementAccount(address): Promise<PlayerAchievementAccount>
-
Returns Promise<PlayerAchievementAccount>
fetchPlayerAchievementInfo
- fetchPlayerAchievementInfo(user): Promise<PlayerAchievementAccount[]>
-
Returns Promise<PlayerAchievementAccount[]>
fetchPlayerScoresListAccount
- fetchPlayerScoresListAccount(address): Promise<PlayerScoresListAccount>
-
Returns Promise<PlayerScoresListAccount>
fetchRewardAccount
- fetchRewardAccount(address): Promise<RewardAccount>
-
Returns Promise<RewardAccount>
initializeNewGame
- initializeNewGame(newGame, title, description, genre, gameType, nftMeta, authorities): Promise<InitializeGame>
-
Parameters
-
newGame: PublicKey
-
title: string
-
description: string
-
-
-
nftMeta: PublicKey
-
authorities: PublicKey[]
Returns Promise<InitializeGame>
initializePlayerAccount
- initializePlayerAccount(user, username, nftMeta): Promise<InitializePlayer>
-
Parameters
-
user: PublicKey
-
username: string
-
nftMeta: PublicKey
Returns Promise<InitializePlayer>
initiateMerge
- initiateMerge(user, newMergeAccount, playerAccountKeys): Promise<InitiateMerge>
-
Parameters
-
user: PublicKey
-
newMergeAccount: PublicKey
-
playerAccountKeys: PublicKey[]
Returns Promise<InitiateMerge>
registerMergeApproval
- registerMergeApproval(user, mergeAccount): Promise<RegisterMergeApproval>
-
Parameters
-
user: PublicKey
-
mergeAccount: PublicKey
Returns Promise<RegisterMergeApproval>
registerPlayerEntryForLeaderBoard
- registerPlayerEntryForLeaderBoard(user, leaderboard): Promise<RegisterPlayerEntry>
-
Parameters
-
user: PublicKey
-
leaderboard: PublicKey
Returns Promise<RegisterPlayerEntry>
sendAndConfirmTransaction
- sendAndConfirmTransaction(transaction, signers?, opts?): Promise<string>
-
Parameters
-
transaction: Transaction
-
Optional
signers: Signer[]
-
Optional
opts: ConfirmOptions
Returns Promise<string>
sendAndConfirmTransactions
- sendAndConfirmTransactions(transactions, signers?, opts?): Promise<string[]>
-
Parameters
-
transactions: Transaction[]
-
signers: Signer[][] = []
-
Optional
opts: ConfirmOptions
Returns Promise<string[]>
submitScoreToLeaderBoard
- submitScoreToLeaderBoard(user, authority, leaderboard, score): Promise<SubmitScore>
-
Parameters
-
user: PublicKey
-
authority: PublicKey
-
leaderboard: PublicKey
-
score: BN
Returns Promise<SubmitScore>
unlockPlayerAchievement
- unlockPlayerAchievement(user, authority, achievement, leaderboard, game?): Promise<UnlockPlayerAchievement>
-
Parameters
-
user: PublicKey
-
authority: PublicKey
-
achievement: PublicKey
-
leaderboard: PublicKey
-
Optional
game: PublicKey
Returns Promise<UnlockPlayerAchievement>
updateGameAccount
- updateGameAccount(game, authority, newMeta?, newAuths?): Promise<UpdateGame>
-
Parameters
-
game: PublicKey
-
authority: PublicKey
-
Optional
newMeta: GameAttributes
-
Optional
newAuths: PublicKey[]
Returns Promise<UpdateGame>
updateGameAchievement
- updateGameAchievement(authority, achievement, newTitle?, newDescription?, newNftMeta?): Promise<UpdateAchievement>
-
Parameters
-
authority: PublicKey
-
achievement: PublicKey
-
Optional
newTitle: string
-
Optional
newDescription: string
-
Optional
newNftMeta: PublicKey
Returns Promise<UpdateAchievement>
updateGameLeaderboard
- updateGameLeaderboard(authority, leaderboard, newDescription?, newNftMeta?): Promise<UpdateLeaderboard>
-
Parameters
-
authority: PublicKey
-
leaderboard: PublicKey
-
Optional
newDescription: string
-
Optional
newNftMeta: PublicKey
Returns Promise<UpdateLeaderboard>
updatePlayerAccount
- updatePlayerAccount(user, newUsername?, newNftMeta?): Promise<UpdatePlayer>
-
Parameters
-
user: PublicKey
-
Optional
newUsername: string
-
Optional
newNftMeta: PublicKey
Returns Promise<UpdatePlayer>
verifyPlayerNftReward
- verifyPlayerNftReward(user, achievement, mint): Promise<VerifyReward>
-
Parameters
-
user: PublicKey
-
achievement: PublicKey
-
mint: PublicKey
Returns Promise<VerifyReward>
Static
get
- get(provider, programId?): SoarProgram
-
Parameters
-
provider: AnchorProvider
-
Optional
programId: PublicKey
Add a fungible token reward for unlocking an achievement.